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

- Severity: Medium 4.8 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-04-16T01:20:08.397Z
- Modified: 2026-11-08T14:02:51.444Z
- Weaknesses: CWE-150
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- Artifex Software Inc. MuPDF: before 1.27.0; 0f17d789fe8c29b41e47663be82514aaca3a4dfb
- artifex mupdf: before 1.27.0

## Every score

- VulnCheck: CVSS:4.0 4.8 Medium `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`
- VulnCheck: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`

## References

- <https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0> (product, release-notes)
- <https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb> (patch)
- <https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb> (issue-tracking, patch)
- <https://www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-40505](https://www.cve.org/CVERecord?id=CVE-2026-40505), CVE Terms of Use, modified 2026-11-08
- NVD: [CVE-2026-40505](https://nvd.nist.gov/vuln/detail/CVE-2026-40505), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40505 · Whole record: https://cve.day/CVE-2026-40505.json · Rebuilt by cve.day 2026-11-25T22:59:18.887Z
