CVE-2026-40505

NameCVE-2026-40505
DescriptionMuPDF 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
mupdf (PTS)bullseye1.17.0+ds1-2vulnerable
bullseye (security)1.17.0+ds1-2+deb11u1vulnerable
bookworm1.21.1+ds2-1vulnerable
trixie1.25.1+ds1-6vulnerable
forky, sid1.27.0+ds1-4vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
mupdfsource(unstable)(unfixed)

Notes

[trixie] - mupdf <no-dsa> (Minor issue)
[bookworm] - mupdf <no-dsa> (Minor issue)
https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb
https://bugs.ghostscript.com/show_bug.cgi?id=709108

Search for package or bug name: Reporting problems