CVE-2026-40505
MuPDF mutool does not sanitize PDF metadata fields before writing …
MuPDF mutool does not sanitize PDF metadata fields before writing them to terminal output, allowing attackers to inject arbitrary ANSI escape sequences through crafted PDF metadata. Attackers can embed malicious ANSI escape codes in PDF metadata that are passed unsanitized to the terminal when running mutool info, enabling them to clear the terminal display and render arbitrary text for social engineering attacks such as presenting fake prompts or spoofed commands.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514a
- www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata
- github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb
- github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0
- nvd.nist.gov/vuln/detail/CVE-2026-40505
- cve.org/CVERecord?id=CVE-2026-40505
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.