CVE-2026-40505
MuPDF < 1.27 mutool ANSI Injection via Metadata
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.8
MuPDF < 1.27 mutool ANSI Injection via Metadata
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.
- Record
CVE-2026-40505- 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 - 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 - Weakness
- CWE-150
- Updated
- 2026-11-02
EUVDEUVD-2026-23147
4.8
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.
- Record
EUVD-2026-23147- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-hj44-m5xv-x75q
4.8
MuPDF mutool does not sanitize PDF metadata fields before writing them to terminal output,...
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.
- Record
GHSA-hj44-m5xv-x75q- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - 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 - Weakness
- CWE-150
- Updated
- 2026-11-02
NVD
4.8
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.
- Record
CVE-2026-40505- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - 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 - Weakness
- CWE-150
- Updated
- 2026-11-02
OSV
4.8
MuPDF < 1.27 mutool ANSI Injection via Metadata
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.
- Record
CVE-2026-40505- 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 - Weakness
- CWE-150
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-40505
4.8
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.
- Record
DEBIAN-CVE-2026-40505- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-40505
4.8
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.
- Record
UBUNTU-CVE-2026-40505- 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 - 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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mupdfDebian:12 |
All versions, plus listed versions 1.21.1+ds2-11.21.1+ds2-1+deb12u11.22.1+ds1-11.22.2+ds1-11.22.2+ds1-2 Show 27 moreShow less1.23.10+ds1-11.23.10+ds1-21.23.6+ds1-11.23.7+ds1-11.24.10+ds1-11.24.3+ds1-11.24.8+ds2-11.24.8+ds2-21.24.9+ds1-11.25.1+ds1-11.25.1+ds1-21.25.1+ds1-31.25.1+ds1-41.25.1+ds1-51.25.1+ds1-61.25.1+ds1-71.25.1+ds1-81.25.1+ds1-91.27.0+ds1-11.27.0+ds1-21.27.0+ds1-31.27.0+ds1-41.27.0+ds1-51.27.0+ds1-61.28.0+ds1-11.28.2+ds1-11.28.2+ds1-2 |
None known |
mupdfDebian:13 |
All versions, plus listed versions 1.25.1+ds1-61.25.1+ds1-6+deb13u11.25.1+ds1-71.25.1+ds1-81.25.1+ds1-9 Show 9 moreShow less1.27.0+ds1-11.27.0+ds1-21.27.0+ds1-31.27.0+ds1-41.27.0+ds1-51.27.0+ds1-61.28.0+ds1-11.28.2+ds1-11.28.2+ds1-2 |
None known |
mupdfDebian:14 |
before 1.27.0+ds1-5, plus listed versions 1.25.1+ds1-61.25.1+ds1-71.25.1+ds1-81.25.1+ds1-91.27.0+ds1-11.27.0+ds1-21.27.0+ds1-31.27.0+ds1-4 |
1.27.0+ds1-5 |
mupdfUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.7-11.7a-11.7a-1ubuntu0.1~esm1 |
None known |
mupdfUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.11+ds1-1.11.11+ds1-21.12.0+ds1-11.12.0+ds1-1ubuntu0.1~esm11.12.0+ds1-1ubuntu0.1~esm2 |
None known |
mupdfUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 1.15.0+ds1-11.16.1+ds1-1ubuntu11.16.1+ds1-1ubuntu1+esm11.16.1+ds1-1ubuntu1+esm2 |
None known |
mupdfUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.17.0+ds1-21.19.0+ds1-11.19.0+ds1-1build11.19.0+ds1-21.19.0+ds1-2ubuntu0.1~esm1 |
None known |
mupdfUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 1.22.2+ds1-21.22.2+ds1-2build11.23.6+ds1-11.23.7+ds1-11.23.10+ds1-1 Show 4 moreShow less1.23.10+ds1-1build11.23.10+ds1-1build21.23.10+ds1-1build31.23.10+ds1-1ubuntu0.1~esm1 |
None known |
mupdfUbuntu:25.10 |
All versions, plus listed versions 1.25.1+ds1-5build21.25.1+ds1-61.25.1+ds1-7 |
None known |
mupdfUbuntu:26.10 |
All versions, plus listed versions 1.27.0+ds1-3ubuntu21.27.0+ds1-3ubuntu3 |
None known |
mupdfUbuntu:26.04:LTS |
All versions, plus listed versions 1.25.1+ds1-71.25.1+ds1-7build11.25.1+ds1-7build21.27.0+ds1-2ubuntu11.27.0+ds1-3ubuntu11.27.0+ds1-3ubuntu2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40505 is a medium vulnerability (CVSS 4.8) in Artifex Mupdf, published April 16, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.17%, the 5th percentile. Fixed in mupdf 1.27.0+ds1-5.
References
github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0
github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb
cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb
vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata
nvd.nist.gov/vuln/detail/CVE-2026-40505
github.com/advisories/GHSA-hj44-m5xv-x75q