CVE-2026-40505: CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences in Artifex Software Inc. MuPDF
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.
AI Analysis
Technical Summary
CVE-2026-40505 is an ANSI injection vulnerability in Artifex Software Inc.'s MuPDF before version 1.27. The mutool utility does not properly neutralize ANSI escape sequences embedded in PDF metadata fields. As a result, attackers can craft PDFs with malicious metadata that, when processed by mutool info, output arbitrary ANSI escape codes to the terminal. This can manipulate terminal display for social engineering purposes. The vulnerability is categorized under CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences). No vendor advisory or patch is currently available.
Potential Impact
The vulnerability allows attackers to inject arbitrary ANSI escape sequences into terminal output when running mutool info on crafted PDFs. This can lead to terminal display manipulation, potentially deceiving users with fake prompts or spoofed commands. There is no indication of direct code execution or privilege escalation. The impact is primarily social engineering and user deception.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should exercise caution when running mutool info on untrusted PDF files and consider sanitizing or inspecting PDF metadata before processing.
CVE-2026-40505: CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences in Artifex Software Inc. MuPDF
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 v4.0
Score 4.8medium
Affected software
pkg:github/artifexsoftware/mupdfRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40505 is an ANSI injection vulnerability in Artifex Software Inc.'s MuPDF before version 1.27. The mutool utility does not properly neutralize ANSI escape sequences embedded in PDF metadata fields. As a result, attackers can craft PDFs with malicious metadata that, when processed by mutool info, output arbitrary ANSI escape codes to the terminal. This can manipulate terminal display for social engineering purposes. The vulnerability is categorized under CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences). No vendor advisory or patch is currently available.
Potential Impact
The vulnerability allows attackers to inject arbitrary ANSI escape sequences into terminal output when running mutool info on crafted PDFs. This can lead to terminal display manipulation, potentially deceiving users with fake prompts or spoofed commands. There is no indication of direct code execution or privilege escalation. The impact is primarily social engineering and user deception.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should exercise caution when running mutool info on untrusted PDF files and consider sanitizing or inspecting PDF metadata before processing.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-04-13T20:29:02.808Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e03f8c82d89c981fff3a67
Added to database: 04/16/2026, 01:46:52 UTC
Last enriched: 07/15/2026, 10:27:53 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 150
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.