CVE-2026-40505
MuPDF < 1.27 mutool ANSI Injection via Metadata
3.3CVSSLOW
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.
CVSS Vector Breakdown
Exploitability
AV:LAttack VectorLocal
AC:LAttack ComplexityLow
PR:NPrivileges RequiredNone
UI:RUser InteractionRequired
Scope
S:UScopeUnchanged
Impact
C:NConfidentialityNone
I:LIntegrityLow
A:NAvailabilityNone
Weaknesses
Affected Products
Exploitability
Official Patch Available
References
https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0
github.com
https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb
github.com
https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb
cgit.ghostscript.com
and 1 more references View all →
Timeline
Published
Apr 16, 2026
Last Updated
May 26, 2026
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2026-40505 and every CVE in our database. Create a free account — no credit card required.
Create Free AccountPlain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows