GraySoft
Projects Models Compare Cloud benchmarks FAQ Download guIDE →
Model Intelligence Sheet

hacnho/gguf-bos-token-id-hidden-prefix-poc overview

GGUF bos token id Hidden Prefix PoC This repository contains a bounded security research proof of concept for a GGUF tokenizer metadata output manipulation iss…

ggufsecurityhuntrproof-of-conceptendpoints_compatibleregion:us

Runs locally from ~589.1 MB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).

Downloads
0
Likes
0
Pipeline
Author

Repository Files & Downloads

1 GGUF files detected
Direct downloads for local inference
FileTypeQuantizationSizeLink
gemma-4-1B-0.8B-tiny.Q2_K.bos-hello.ggufGGUFGGUF589.1 MBDownload

Model Details

Model IDhacnho/gguf-bos-token-id-hidden-prefix-poc
Authorhacnho
Pipeline
License
Base model
Last modified2026-06-27T08:25:19.000Z

Model README

---

library_name: gguf

tags:

  • security
  • huntr
  • gguf
  • proof-of-concept

---

GGUF bos_token_id Hidden Prefix PoC

This repository contains a bounded security research proof of concept for a

GGUF tokenizer-metadata output manipulation issue in llama.cpp.

The malicious artifact changes:

tokenizer.ggml.bos_token_id = 9259

Token 9259 is the normal text piece Hello. When llama.cpp automatically

adds a BOS token during tokenization, the model file causes that hidden BOS

slot to become Hello instead.

Files

  • gemma-4-1B-0.8B-tiny.Q2_K.bos-hello.gguf: malicious GGUF artifact
  • reproduce.py: verifier for tokenization, inference, and modelscan posture

Expected Result

Prompt:

world

Control tokenization:

[2, 12392]

Malicious tokenization:

[9259, 12392]

Control output:

<bos>worldworldworldworldworldworldworldworldworld

Malicious output:

Helloworldworldworldworldworldworldworldworldworld

The malicious file was tested with llama.cpp llama-simple and

llama-tokenize. modelscan==0.8.8 reported No issues found and skipped the

GGUF file.

Run hacnho/gguf-bos-token-id-hidden-prefix-poc with guIDE

Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.

Download guIDE → · Browse 524k+ models · Compare models

Source: Hugging Face · Compare models