Vulnerability · Published Apr 16, 2026 · Assigned by VulnCheck
CVE-2026-40505MuPDF < 1.27 mutool ANSI Injection via Metadata
Low 3.3
In plain English
A low-severity security flaw in MuPDF from Artifex Software Inc.. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | mupdf | no fix listed | DEBIAN-CVE-2026-40505 |
| Debian:13 | mupdf | no fix listed | DEBIAN-CVE-2026-40505 |
| Debian:14 | mupdf | 1.27.0+ds1-5 | DEBIAN-CVE-2026-40505 |
| Ubuntu:25.10 | mupdf | no fix listed | UBUNTU-CVE-2026-40505 |
| Ubuntu:26.04:LTS | mupdf | no fix listed | UBUNTU-CVE-2026-40505 |
| Ubuntu:26.10 | mupdf | no fix listed | UBUNTU-CVE-2026-40505 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Artifex Software Inc. | MuPDF | 0 – before 1.27.00f17d789fe8c29b41e47663be82514aaca3a4dfb |
Weakness: CWE-150 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
References
- https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0 release-notes
- https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb patch
- https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb issue-tracking
- https://www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata third-party-advisory