REVIEW 3 major objections 5 minor 35 references
A document-aware detector can catch hidden prompt injections in PDFs before flattening discards the evidence—at 0.960 F1 on a controlled benchmark.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
T0 review · deepseek-v4-flash
2026-08-04 04:28 UTC pith:Y626FQOA
load-bearing objection A well-scoped, honestly evaluated benchmark for hidden PDF injection; the main risk is that everything is generated by the authors' own pipeline, so treat the headline F1 as evidence about that pipeline. the 3 major comments →
CrackedPDFs: A Controlled Benchmark for Hidden Prompt Injection in PDFs
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
On the paper's own terms, the discovery is that hidden PDF instructions leave detectable evidence at the document layer: a detector that reads content-stream operators, font and rendering state, coordinates, and sanitized extracted text can separate injected from benign files even when the benign file is a matched confounder from the same base document. Under provenance-split evaluation, this detector achieves 0.960 F1 (ROC-AUC 0.998, PR-AUC 0.997) on 2,919 held-out PDFs, 95.9% accuracy on the 973-pair balanced subset, and 100% within-pair ranking. The paper frames this as evidence for document-aware screening at ingestion, not as a general solution.
What carries the argument
The carrying mechanism is pre-flattening feature extraction: PDF content streams are parsed with their operator sequences, font choices, rendering modes, coordinates, and stream structure preserved, then combined with text features after removing wrapper markers. Pairing each injected PDF with a benign confounder from the same base document, and splitting by base document, forces the detector to use injection-specific evidence rather than generation artifacts. A sanitized hybrid detector—structural operators plus cleaned text, with metadata excluded—is the primary model; the benchmark itself, CrackedPDFs, is the evaluation instrument.
Load-bearing premise
The entire evaluation lives inside PDFs produced by the authors' own deterministic generators, so the detector's high performance may partly reflect the specific way this generator writes PDFs rather than a general property of hidden injections.
What would settle it
Take the trained hybrid detector and run it on PDFs created by an independent injection tool or on real-world documents with hidden text; if within-pair ranking drops from 100% toward chance while the generator-specific test set stays high, the central claim survives as a controlled result but not as evidence of general document-aware detection.
If this is right
- Document-layer screening at ingestion can catch hidden injections that text-only guardrails miss, so PDF structure should be part of the security boundary for LLM systems.
- The paired-confounder protocol gives a reusable template for evaluating other document security detectors.
- The attack families (invisible render mode, tiny fonts, off-page text, split text objects, steganographic variants) show that hidden text can be placed through low-level PDF operators without changing the visible layout.
- Because the hybrid detector still fails on steganographic acrostics in held-out family tests, even strong document-aware detection needs complementary semantic and model-level safeguards.
- The benchmark's 29,322-document corpus provides a controlled testbed for future injection detectors.
Where Pith is reading between the lines
- If this transfers beyond the synthetic generator, ingestion-time structural screening could become a practical pre-filter for document pipelines; a direct way to test that is to feed the detector PDFs produced by unrelated tools and measure rank accuracy.
- The 100% within-pair ranking suggests the detector is not just finding suspicious text but a stable signal tied to how the hidden text is embedded, which could be compressed into a lightweight feature for real-time screening.
- The paper's negative results—text-only guardrail recall around 0.25 and structural-only F1 below 0.65—imply that neither pure semantics nor pure syntax alone solves the problem, pushing future work toward multimodal or provenance-aware models.
- Since the benchmark is synthetic and single-generator, the strongest testable extension is a cross-generator study: generate the same attack families with different PDF libraries and see whether the detector's 0.960 F1 holds or collapses.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces CrackedPDFs, a synthetic benchmark of 29,322 PDFs (9,774 injected, 19,548 benign/confounders) generated from 4,983 base documents using PDFAutoGen and a pikepdf-based injector. It evaluates PromptGuard, a rule baseline, structural-only logistic regression/XGBoost, a text-only TF-IDF comparator, and a sanitized hybrid detector. The evaluation uses hard provenance splits grouped by base document, paired benign confounders, label-shuffle checks, shortcut audits, and held-out attack-family stress tests. The headline result is that the hybrid detector reaches 0.960 F1, 0.998 ROC-AUC, and 0.997 PR-AUC on a 2,919-document held-out test set, with 95.9% thresholded accuracy and 100% within-pair ranking on 973 matched injected/benign pairs. The authors explicitly limit their claims to this controlled generator distribution and disclaim OCR-only pipelines, adaptive attackers, unseen generators, and real-world PDFs.
Significance. If the reported results hold, CrackedPDFs is a well-executed controlled benchmark with unusually rigorous evaluation hygiene: provenance-based splits, matched paired negatives, label-shuffle sanity checks, shortcut audits, and published failure cases (e.g., steganographic acrostics paired-rank accuracy 0.424). The honest separation of clean positive evidence from shortcut-prone comparators is a strength. The main limitation is external validity: all PDFs come from the authors' own generators, and no independent detector is benchmarked on the corpus. This does not invalidate the controlled paired-evaluation claim, but it limits the benchmark's usefulness as a community resource until transfer evidence is supplied.
major comments (3)
- [Abstract; §4.1, §4.10] The single-generator distribution is the main threat to the headline result. All 29,322 PDFs are produced by PDFAutoGen and the authors' pikepdf-based injector, so the abstract's '0.960 F1' is an estimate on one synthetic distribution; the near-deterministic AUCs are consistent with learning generator-specific signatures (e.g., render-mode-3, off-page, and low-contrast features listed in §4.5). The paper explicitly disclaims transfer (§4.10, §5.6), so this is a scope boundary rather than an internal contradiction. Nevertheless, for a benchmark contribution the usefulness depends on transfer. Please add at least one cross-generator transfer test—e.g., train on CrackedPDFs and test on an independent invisible-text injector, or report a seed/template ablation—and state precisely what the controlled benchmark is intended to support.
- [§5.4 vs §5.5] The relationship between the 100% within-pair ranking claim and the held-out family stress tests needs clarification. If the 973-pair balanced subset contains steganographic acrostics, then the later statement that steganographic acrostics have paired-rank accuracy 0.424 cannot both hold on the same pairs. If the family stress tests use a separate split (e.g., attack family excluded from training), this should be stated explicitly, and the composition of the 973-pair subset should be reported. As written, the abstract's '100%' can be misread as holding across all attack families, which the stress tests themselves contradict.
- [§5.1, §5.5] The results are reported as point estimates without confidence intervals, repeated-seed variance, or any comparison to the closest prior detector. PhantomLint is cited as the closest prior work but is never run on CrackedPDFs, so the relative difficulty of the benchmark is unknown. Similarly, the generator is seeded and deterministic, but 0.960 F1 may vary with generator seed; no bootstrap or repeated-seed results are reported. For a benchmark paper, at least one independent baseline detector and a measure of variability across seeds are needed to make the headline numbers interpretable.
minor comments (5)
- [§4.7 / §5.1] The rule baseline is never described. Please specify its rules or cite the implementation so that its 0.623 F1 result is interpretable.
- [§5.2] The label-shuffle sanity check is described as 'repeated training,' but only one result is reported. Please report the mean and standard deviation over multiple shuffled-label runs.
- [§4.5] The feature list includes 'artifact-wrapper counts,' while the excluded metadata list includes 'Artifact-wrapper flag.' Please clarify the distinction to rule out feature leakage from wrapper markers.
- [§4.3] The message sourcing from public prompt-injection datasets [34,35] should include version and license information for reproducibility.
- [References] PDFAutoGen [33] is cited as a GitHub repository. Please cite a versioned release or DOI so the exact generator version is pinned.
Circularity Check
No significant circularity: the headline 0.960 F1 is a measured held-out evaluation on a deliberately controlled benchmark, and the paper explicitly disclaims generalization beyond its own generator.
full rationale
The paper's central result is not a derived prediction but an empirical evaluation on a held-out, provenance-split test set, with label-shuffle and shortcut audits as controls. The hybrid detector's features (e.g., render-mode-3 counts, off-page text counts) are aligned with the known injection construction, but this is stated feature engineering on a controlled threat model, not a fitted parameter renamed as a prediction. The detector is trained only on the training split; the test labels, paired-ranking outcome, and F1 are not used in fitting. The single self-citation, PDFAutoGen [33], is the authors' own deterministic generator for benign documents; it is cited as a publicly available data-generation tool, not as a theorem or uniqueness argument, and it does not force the detection result. The paper repeatedly disclaims real-world and cross-generator generalization (§4.10, §5.6), so the single-generator distribution is an external-validity boundary, not a logical circle. No specific reduction to the paper's own inputs—by equation, by construction, or by self-citation chain—could be identified, so no circular step is reported.
Axiom & Free-Parameter Ledger
free parameters (4)
- Detection threshold τ =
0.5 (default for simple baselines; hybrid threshold not fully specified)
- Hand-selected structural feature set =
Hand-chosen; no single numeric value
- Benign-document generation configuration (PDFAutoGen) =
14 templates, 2 page sizes, 3 margins, 3 densities, 6 fonts
- Injection regime mix =
Hand-picked spatial/render/structural regimes and attack families
axioms (5)
- domain assumption Hidden injection can always be represented as extractable text operators in a PDF content stream.
- domain assumption OCR-based rendered-page checks certify that injected content is not visible to a human.
- ad hoc to paper PDFAutoGen-generated synthetic one-page documents are an adequate stand-in for the benign PDF distribution.
- domain assumption Grouped-by-base_pdf_id splits sufficiently control leakage across related variants.
- standard math Underlying libraries and classifiers behave as documented.
read the original abstract
Document-based LLM systems often flatten a PDF before guardrails inspect it. That step can discard evidence that an instruction was never visible to the user. We introduce CrackedPDFs, a controlled benchmark for hidden prompt injection in PDFs. The benchmark contains 29,322 generated PDFs from 4,983 base documents. It includes 9,774 injected files and 19,548 benign or matched-confounder files. We evaluate PromptGuard and a rule baseline. We also evaluate structural-only learned models and a sanitized hybrid detector. The evaluation uses held-out provenance splits and paired benign-confounder controls. It also uses label-shuffle checks and shortcut audits. On a 2,919-document held-out test set, the hybrid detector reaches 0.960 F1. ROC-AUC is 0.998 and PR-AUC is 0.997. On a balanced subset containing 973 injected PDFs and 973 matched benign confounders, the hybrid detector achieves 95.9% classification accuracy. Using score ordering, it ranks the injected member above its matched confounder in 100% of 973 pairs. PromptGuard has low recall when given extracted text only. Structural-only learned models are weak under paired controls. A text-only TF-IDF model reaches perfect held-out scores but fails shortcut audits. These results show that document-aware hybrid detection is useful under controlled paired evaluation. They do not show broad real-world robustness or reliable cross-family generalization.
Figures
Reference graph
Works this paper leans on
-
[1]
LLM01 2025 Prompt Injection
OW ASP. LLM01 2025 Prompt Injection. 11 https://genai.owasp.org/llmrisk/llm01-prompt-injection/
2025
-
[2]
https://arxiv.org/abs/2306.05499
Prompt Injection Attack against LLM-Integrated Applications. https://arxiv.org/abs/2306.05499
-
[3]
https://arxiv.org/abs/2601.22240
A Systematic Literature Review on LLM Defenses Against Prompt Injection and Jailbreaking. https://arxiv.org/abs/2601.22240
-
[4]
Prompt Injection Defenses
tldrsec. Prompt Injection Defenses. https://github.com/tldrsec/prompt-injection-defenses
-
[5]
Principled Detection of Hidden LLM Prompts in Structured Documents
PhantomLint. Principled Detection of Hidden LLM Prompts in Structured Documents. https://arxiv.org/abs/2508.17884
-
[6]
Hidden-Comment Injection in LLM Agents
When Skills Lie. Hidden-Comment Injection in LLM Agents. https://arxiv.org/abs/2602.10498
-
[7]
Malicious Font Injection in External Resources for Large Language Models
Invisible Prompts, Visible Threats. Malicious Font Injection in External Resources for Large Language Models. https://arxiv.org/pdf/2505.16957.pdf. See alsohttps://aclanthology.org/2025.findings-emnlp.376/
Pith/arXiv arXiv 2025
-
[8]
https://arxiv.org/pdf/2509.10248.pdf
Prompt Injection Attacks on LLM Generated Reviews of Scientific Publications. https://arxiv.org/pdf/2509.10248.pdf
-
[9]
https://arxiv.org/abs/2512.23684
Multilingual Hidden Prompt Injection Attacks on LLM-Based Academic Reviewing. https://arxiv.org/abs/2512.23684
-
[10]
https://zenodo.org/records/16603590
Disrupting Large Language Models with Hidden Prompt Injection Attacks Embedded in HTML Pages. https://zenodo.org/records/16603590
-
[11]
Prompt Injection Exploits Invisible PDF Text to Pass Credit Score Analysis
Snyk. Prompt Injection Exploits Invisible PDF Text to Pass Credit Score Analysis. https://snyk.io/articles/ prompt-injection-exploits-invisible-pdf-text-to-pass-credit-score-analysis/
-
[12]
Invisible Prompt Injection Secure AI
Trend Micro. Invisible Prompt Injection Secure AI. https://www.trendmicro.com/en_us/research/25/a/ invisible-prompt-injection-secure-ai.html
-
[13]
Invisible Unicode Jailbreak
Promptfoo. Invisible Unicode Jailbreak. https: //www.promptfoo.dev/lm-security-db/vuln/invisible-unicode-jailbreak-779fc810
-
[14]
Detecting Prompt Injection Attacks in LLMs
Attention Tracker. Detecting Prompt Injection Attacks in LLMs. https://arxiv.org/abs/2411.00348
-
[15]
Prompt Guard: Model Card formeta-llama/Prompt-Guard-86M
Meta AI. Prompt Guard: Model Card formeta-llama/Prompt-Guard-86M. Hugging Face, 2024. https://huggingface.co/meta-llama/Prompt-Guard-86M
2024
-
[16]
Llama-Prompt-Guard-2-86M
Meta. Llama-Prompt-Guard-2-86M. https://huggingface.co/meta-llama/Llama-Prompt-Guard-2-86M
-
[17]
https://arxiv.org/abs/2506.06384
Detection Method for Prompt Injection by Integrating Pre-trained Model and Heuristic Feature Engineering. https://arxiv.org/abs/2506.06384
-
[18]
https://arxiv.org/abs/2512.12583
Detecting Prompt Injection Attacks Against Application Using Classifiers. https://arxiv.org/abs/2512.12583. 12
-
[19]
https://media.sciltp.com/articles/2506000841/2506000841.pdf
Prompt Injection Detection in LLM Integrated Applications. https://media.sciltp.com/articles/2506000841/2506000841.pdf
-
[20]
A Lightweight Defense Against Prompt Injections in LLMs
Zero-Shot Embedding Drift Detection. A Lightweight Defense Against Prompt Injections in LLMs. https://arxiv.org/abs/2601.12359
-
[21]
Context-Aware Prompt Injection Testing and Robustness Enhancement
CAPTURE. Context-Aware Prompt Injection Testing and Robustness Enhancement. https://arxiv.org/html/2505.12368v1
-
[22]
Content Masking Attack Against Information-Based Online Services
PDF Mirage. Content Masking Attack Against Information-Based Online Services. https: //www.usenix.org/system/files/conference/usenixsecurity17/sec17-markwood.pdf
-
[23]
Studying, Finding, and Localizing Inconsistency Bugs in PDF Readers and Files
On the Correctness of Electronic Documents. Studying, Finding, and Localizing Inconsistency Bugs in PDF Readers and Files. https://link.springer.com/article/10.1007/s10664-018-9600-2
-
[24]
https://www.usenix.org/system/files/sec20-chen-yizheng.pdf
On Training Robust PDF Malware Classifiers. https://www.usenix.org/system/files/sec20-chen-yizheng.pdf
-
[25]
https://www.emergentmind.com/topics/optical-character-recognition-ocr-exploits
OCR Exploits and Adversarial Vulnerabilities. https://www.emergentmind.com/topics/optical-character-recognition-ocr-exploits
-
[26]
PDF Document Security
Documind. PDF Document Security. https://www.documind.chat/blog/pdf-document-security
-
[27]
https://arxiv.org/html/2504.14348v1
Manipulating Multimodal Agents via Cross-Modal Prompt Injection. https://arxiv.org/html/2504.14348v1
-
[28]
https://pmc.ncbi.nlm.nih.gov/articles/PMC4993050/
Metamorphic Testing for Cybersecurity. https://pmc.ncbi.nlm.nih.gov/articles/PMC4993050/
-
[29]
https://www.cs.cornell.edu/fbs/publications/Hyperproperties.pdf
Hyperproperties. https://www.cs.cornell.edu/fbs/publications/Hyperproperties.pdf
-
[30]
https://proglearn.neurodata.io/experiments/label_shuffle_exp
Label Shuffle Experiment. https://proglearn.neurodata.io/experiments/label_shuffle_exp
-
[31]
https://arxiv.org/abs/2403.17212
Sanity Checks for Explanation Uncertainty. https://arxiv.org/abs/2403.17212
-
[32]
Machine Learning Crash Course ROC and AUC
Google. Machine Learning Crash Course ROC and AUC. https://developers.google.com/machine-learning/crash-course/classification/ roc-and-auc
-
[33]
PDFAutoGen: Automated Benchmark Construction Pipeline for Hidden Prompt Injection Detection in PDFs
Pukaphol Thienpreecha. PDFAutoGen: Automated Benchmark Construction Pipeline for Hidden Prompt Injection Detection in PDFs. https://github.com/volkthienpreecha/PDFAutoGen
-
[34]
LLM Jailbreak & Prompt-Injection Dataset
Necent. LLM Jailbreak & Prompt-Injection Dataset. https://huggingface.co/datasets/Necent/llm-jailbreak-prompt-injection-dataset
-
[35]
Prompt Injection and Jailbreak Detection Dataset
NeurAlchemy. Prompt Injection and Jailbreak Detection Dataset. https://huggingface.co/datasets/neuralchemy/Prompt-injection-dataset. 13
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.