CVE-2026-40505: CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences in Artifex Software Inc. MuPDF
MuPDF versions before 1. 27 contain an ANSI injection vulnerability in the mutool utility. This vulnerability allows attackers to inject arbitrary ANSI escape sequences via crafted PDF metadata fields. When mutool info is run on such a malicious PDF, the unsanitized escape codes can manipulate terminal output, potentially enabling social engineering attacks such as fake prompts or spoofed commands. The vulnerability has a medium severity rating with a CVSS score of 4. 8. No official patch or remediation guidance is currently available from the vendor. There are no known exploits in the wild at this time.
AI Analysis
Technical Summary
CVE-2026-40505 is an ANSI injection vulnerability in Artifex Software Inc.'s MuPDF prior to version 1.27. The issue arises because mutool processes PDF metadata fields without properly neutralizing ANSI escape sequences, allowing crafted PDFs to embed malicious ANSI codes. These codes are then output directly to the terminal when using mutool info, enabling attackers to alter terminal display behavior. This vulnerability is categorized under CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences) and has a CVSS 4.8 (medium) score, indicating moderate risk primarily due to the potential for social engineering rather than direct system compromise. No patch or official fix has been documented yet.
Potential Impact
The vulnerability allows attackers to inject ANSI escape sequences into terminal output via PDF metadata processed by mutool. This can be leveraged to manipulate terminal display, potentially deceiving users with fake prompts or spoofed commands. While this does not directly allow code execution or privilege escalation, it poses a risk of social engineering attacks that could lead to further compromise if users are tricked into executing malicious commands.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should exercise caution when running mutool info on untrusted PDF files. Avoid processing PDFs from untrusted sources with mutool or consider running mutool in a restricted or isolated environment to limit potential impact.
CVE-2026-40505: CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences in Artifex Software Inc. MuPDF
Description
MuPDF versions before 1. 27 contain an ANSI injection vulnerability in the mutool utility. This vulnerability allows attackers to inject arbitrary ANSI escape sequences via crafted PDF metadata fields. When mutool info is run on such a malicious PDF, the unsanitized escape codes can manipulate terminal output, potentially enabling social engineering attacks such as fake prompts or spoofed commands. The vulnerability has a medium severity rating with a CVSS score of 4. 8. No official patch or remediation guidance is currently available from the vendor. There are no known exploits in the wild at this time.
CVSS v4.0
Score 4.8medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40505 is an ANSI injection vulnerability in Artifex Software Inc.'s MuPDF prior to version 1.27. The issue arises because mutool processes PDF metadata fields without properly neutralizing ANSI escape sequences, allowing crafted PDFs to embed malicious ANSI codes. These codes are then output directly to the terminal when using mutool info, enabling attackers to alter terminal display behavior. This vulnerability is categorized under CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences) and has a CVSS 4.8 (medium) score, indicating moderate risk primarily due to the potential for social engineering rather than direct system compromise. No patch or official fix has been documented yet.
Potential Impact
The vulnerability allows attackers to inject ANSI escape sequences into terminal output via PDF metadata processed by mutool. This can be leveraged to manipulate terminal display, potentially deceiving users with fake prompts or spoofed commands. While this does not directly allow code execution or privilege escalation, it poses a risk of social engineering attacks that could lead to further compromise if users are tricked into executing malicious commands.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should exercise caution when running mutool info on untrusted PDF files. Avoid processing PDFs from untrusted sources with mutool or consider running mutool in a restricted or isolated environment to limit potential impact.
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: 4/16/2026, 1:46:52 AM
Last enriched: 4/24/2026, 4:17:40 PM
Last updated: 5/30/2026, 7:23:55 PM
Views: 95
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.