
CVE catalog
CVE-2026-40505
MuPDF before 1.27 contains an ANSI injection vulnerability in mutool that allows attackers to inject arbitrary ANSI escape sequences through crafted PDF metadata fields. Attackers can embed malicious
- Severity
- Medium · CVSS 4.8
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.17% · Oct 25, 2026
MuPDF before 1.27 contains an ANSI injection vulnerability in mutool that allows attackers to inject arbitrary ANSI escape sequences through crafted PDF metadata fields. Attackers can embed malicious ANSI escape codes in PDF metadata that are passed unsanitized to terminal output when running mutool info, enabling them to manipulate terminal display for social engineering attacks such as presenting fake prompts or spoofed commands.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | mupdf | sid | 1.28.2+ds1-2 | fixed |
| Debian | mupdf | forky | 1.28.2+ds1-2 | fixed |
| Debian | mupdf | trixie | 1.25.1+ds1-6+deb13u1 | vulnerable |
| Debian | mupdf | trixie-security | 1.25.1+ds1-6+deb13u1 | vulnerable |
| Debian | mupdf | bookworm | 1.21.1+ds2-1+deb12u1 | vulnerable |
| Debian | mupdf | bookworm-security | 1.21.1+ds2-1+deb12u1 | vulnerable |
| Cpe | mupdf | Not reported | Not reported | vulnerable |
| Cpe | mupdf | Not reported | 1.27.0 | fixed |
| Cpe | mupdf | Not reported | 1.27.0 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | mupdf | source | sid | 1.27.0+ds1-5 | not yet assigned | Not reported | [1134199] |
| Debian | mupdf | source | forky | 1.27.0+ds1-5 | not yet assigned | Not reported | [1134199] |
| Debian | mupdf | source | trixie | (unfixed) | not yet assigned | Not reported | [1134199] |
| Debian | mupdf | source | bookworm | (unfixed) | not yet assigned | Not reported | [1134199] |
| Cpe | mupdf | cpe | Not reported | 1.27.0 | Not reported | Not reported | Not reported |
| Cpe | mupdf | cpe | Not reported | 1.27.0 | Not reported | NVD-CVE-2026-40505 | Not reported |
Notes
[trixie] mupdf: Minor issue [bookworm] mupdf: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [libmupdf-dev]Affected
Source package: [mupdf]
Details (4)
1.21.1+ds2-1+deb12u1· amd64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· amd64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
- [mupdf]Affected
Details (4)
1.21.1+ds2-1+deb12u1· amd64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· amd64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
- [mupdf-tools]Affected
Source package: [mupdf]
Details (4)
1.21.1+ds2-1+deb12u1· amd64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookwormAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· amd64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
1.21.1+ds2-1+deb12u1· arm64 · bookworm-securityAffected
nvd · mupdf · debian · bookworm; nvd · mupdf · debian · 12
[Debian 13 (Trixie)]
- [libmupdf25.1]Affected
Source package: [mupdf]
Details (4)
1.25.1+ds1-6+deb13u1· amd64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· amd64 · trixie-securityAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixie-securityAffected
nvd · mupdf · debian · 13
- [libmupdf-dev]Affected
Source package: [mupdf]
Details (4)
1.25.1+ds1-6+deb13u1· amd64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· amd64 · trixie-securityAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixie-securityAffected
nvd · mupdf · debian · 13
- [mupdf]Affected
Details (4)
1.25.1+ds1-6+deb13u1· amd64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· amd64 · trixie-securityAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixie-securityAffected
nvd · mupdf · debian · 13
- [mupdf-tools]Affected
Source package: [mupdf]
Details (4)
1.25.1+ds1-6+deb13u1· amd64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· amd64 · trixie-securityAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixie-securityAffected
nvd · mupdf · debian · 13
- [python3-mupdf]Affected
Source package: [mupdf]
Details (4)
1.25.1+ds1-6+deb13u1· amd64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixieAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· amd64 · trixie-securityAffected
nvd · mupdf · debian · 13
1.25.1+ds1-6+deb13u1· arm64 · trixie-securityAffected
nvd · mupdf · debian · 13
Observed:
References
- [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb]
- [https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb]
- [https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-40505]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-40505]
- [https://security-tracker.debian.org/tracker/CVE-2026-40505]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40505.json]
- [https://www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]