CVE-2026-40505 PUBLISHED

MuPDF mutool ANSI Injection via Metadata

Assigner: VulnCheck
Reserved: 13.04.2026 Published: 16.04.2026 Updated: 16.04.2026

MuPDF mutool does not sanitize PDF metadata fields before writing them to terminal output, allowing attackers to inject arbitrary ANSI escape sequences through crafted PDF metadata. Attackers can embed malicious ANSI escape codes in PDF metadata that are passed unsanitized to the terminal when running mutool info, enabling them to clear the terminal display and render arbitrary text for social engineering attacks such as presenting fake prompts or spoofed commands.

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
CVSS Score: 4.8

Product Status

Vendor Artifex Software Inc.
Product MuPDF
Versions Default: unaffected
  • affected from 0 to 0f17d789fe8c29b41e47663be82514aaca3a4dfb (excl.)

Credits

  • Niel Duysters finder

References

Problem Types

  • CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences CWE