CVE-2026-40505: Artifex Software MuPDF · Improper Neutralization of Escape, Meta, or Control Sequences
Affects Artifex Software MuPDFSource CVE Database V5
Not known to be exploited · CVSS 4.8 Medium : upgrade to 1.27.0 when convenient.
Data as of 29 Oct 2026, 19:04 UTC
- EPSS
- 0.1% chance of exploitation in 30 days – higher than 5% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.27.0, 1.27
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 16 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade MuPDF to 1.27.0; artifexsoftware/mupdf to 1.27.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Artifex Software Inc.MuPDF | Affected
| Fixed in
|
GitHubartifexsoftware/mupdfpkg:github/artifexsoftware/mupdfOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
If you cannot patch yet, users should exercise caution when running mutool info on untrusted PDF files and consider sanitizing or inspecting PDF metadata before processing.
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.
References
- github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0 (opens in a new tab)
- github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb (opens in a new tab)
- cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb (opens in a new tab)
- vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata (opens in a new tab)