CVE-2026-40505: MuPDF < 1.27 mutool ANSI Injection via Metadata

Published Apr 16, 2026
·
Updated

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 Software

2 affected components
Artifex Mupdf<1.27
Artifex Mupdf<1.27.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade mupdf/mutool to a version that resolves this vulnerability.

    Fixed in 1.27
  2. Compensating control

    Avoid running `mutool info` on untrusted or attacker-supplied PDFs until MuPDF is upgraded to 1.27 or later, since the vulnerability allows ANSI escape sequence injection via PDF metadata.

Event History

Apr 16, 2026
CVE Published
via MITRE·01:20 AM
Data Sourced
via MITRE·01:20 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40505?

CVE-2026-40505 has been assigned a moderate severity level due to its potential for exploitation through malicious PDF metadata.

2

How do I fix CVE-2026-40505?

To fix CVE-2026-40505, ensure you update to the latest version of MuPDF mutool where this vulnerability has been addressed.

3

What systems are affected by CVE-2026-40505?

CVE-2026-40505 affects all versions of Artifex MuPDF mutool prior to the remediation release.

4

What type of attack does CVE-2026-40505 enable?

CVE-2026-40505 enables attackers to inject arbitrary ANSI escape sequences into terminal output via malicious PDF metadata.

5

Can CVE-2026-40505 lead to remote code execution?

While CVE-2026-40505 does not directly lead to remote code execution, it enables potential phishing or social engineering attacks through malicious terminal output.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203