CVE-2026-40505: MuPDF mutool - Stored XSS
- Cve: CVE-2026-40505
- Name: MuPDF mutool - Stored XSS
- 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.
- Impact: Attackers can manipulate terminal display to perform social engineering attacks by rendering fake prompts or spoofed commands.
- Remediation: Update to the latest version with sanitization of PDF metadata fields before terminal output.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: none
- Labels source: projectdiscovery
- Severity: low
- Cvss score: 3.3
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Epss score: 0.00173
- Epss percentile: 0.06609
- Assignee: [email protected]
- Published at: 2026-04-16T02:16:11Z
- Age in days: 222
- Modified at: 2026-10-26T21:10:00Z
- Patch available: yes
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40505
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-150 | Improper Neutralization of Escape, Meta, or Control Sequences |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| artifex:mupdf | < 1.27.0 | no | nvd | /v1/products/artifex/mupdf |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| ArtifexSoftware/mupdf | commit, fix, releases | yes | /v1/repositories/ArtifexSoftware/mupdf |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts