Overview
Our team discovered memory safety vulnerabilities that lead to arbitrary code execution in several tools shipped with TeX Live (the DVI/PDF backend and font-processing programs), the typesetting system widely used for academic and technical documents, and reported them to the security team at TeX Users Group (TUG), the upstream developer, under coordinated disclosure. None of these vulnerabilities require any special setting such as --shell-escape; they are reachable simply by compiling a document prepared by the attacker. We have demonstrated on the actual official distribution binaries that processing a malicious document leads to a state in which arbitrary code is executed. This article is published in coordination with the upstream developer.

The Vulnerabilities
Through continuous source-code auditing, our team discovered a total of 14 new memory safety vulnerabilities across the dvips, dvipdfmx, and pdfTeX components. All of them sit in the parsing paths for inputs whose contents an attacker can influence, such as images, fonts, and font maps, and are triggered by ordinary operations like compiling a document that embeds a malicious image or references a crafted font.
The breakdown by component and vulnerability class is as follows.
- dvipdfmx (image / PDF / font ingestion): stack buffer overflow, heap buffer overflow, and integer overflow in the parsing of embedded images, PDF streams, and font information (7 issues)
- pdfTeX (font embedding): heap out-of-bounds read and out-of-bounds write in TrueType font parsing (5 issues)
- dvips (conversion to PostScript): stack buffer overflow in the parsing of font maps and fonts (2 issues)
Several of these are not limited to a crash; they lead to arbitrary code execution. We demonstrated end-to-end, on the actual official distribution binaries, the path from compiling a malicious document to a state in which arbitrary code is executed. Which vulnerability corresponds to which input or which code location is withheld from this article to protect users. Note that these vulnerabilities are not in the TeX engine itself, known for its robustness thanks to Donald Knuth; they reside in the peripheral tools bundled with TeX Live, in particular C programs whose origins go back to the 1990s.
Impact and Mitigations
This matters in particular for systems that automatically compile untrusted documents, such as paper submission systems and online document editing and sharing services. In addition, some of the official binaries distributed from tug.org lack mitigations that have become standard in recent years, such as stack protection, position-independent executables (PIE), and bounds checking. In our measurements, issues that remain mere crashes on distribution-rebuilt versions escalate to arbitrary code execution on the official binaries that lack these mitigations. In one of the cases we confirmed, this arbitrary code execution succeeded stably without additional preconditions, even with standard operating-system defenses in place. If you operate upstream TeX Live in such an environment, we recommend treating document compilation as "processing of untrusted input" and sandboxing it appropriately.
Responsible Disclosure and Remediation
In line with the principles of responsible disclosure, since the spring of 2026 we have continuously reported this series of vulnerabilities to the TUG security team, provided fix patches where possible, and requested CVE identifiers. TeX Live is maintained by a small group of volunteers, and throughout this process they responded to us in an entirely sincere and constructive manner. This article is published on a disclosure schedule agreed with the upstream developer. Details of individual vulnerabilities and proof-of-concept code are withheld until the fixes reach users.
Ongoing Vulnerability Research
We have continuously demonstrated the discovery of 0-day (previously undisclosed) vulnerabilities using LLMs from an attacker's perspective. This case is one such result, carried out end-to-end in-house, from large-scale source-code auditing through reproduction and verification on the actual official binaries. We have built up, at a working-engineer level, the ability to go beyond discovery and cover the provision of fix patches and the coordinated disclosure process as well. For similar vulnerability research or risk assessment of your own pipelines, please feel free to contact us.