{"id":"CVE-2026-40505","state":"PUBLISHED","title":"MuPDF < 1.27 mutool ANSI Injection via Metadata","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.","publishedAt":"2026-04-16T01:20:08.397Z","updatedAt":"2026-07-14T20:00:27.664Z","severity":{"score":4.8,"label":"Medium","version":"4.0","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","source":"VulnCheck"},"assigner":"VulnCheck","products":["Artifex Software Inc. MuPDF"],"affected":[{"vendor":"Artifex Software Inc.","product":"MuPDF","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.27.0","versionType":"semver"},{"version":"0f17d789fe8c29b41e47663be82514aaca3a4dfb","status":"affected","versionType":"git"}]}],"references":["https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0","https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb","https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb","https://www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata"],"weaknesses":["CWE-150"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40505.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40505","state":"PUBLISHED","datePublished":"2026-04-16T01:20:08.397Z","dateUpdated":"2026-07-14T20:00:27.664Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-04-13T20:29:02.808Z"},"containers":{"cna":{"title":"MuPDF < 1.27 mutool ANSI Injection via Metadata","descriptions":[{"lang":"en","value":"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":[{"vendor":"Artifex Software Inc.","product":"MuPDF","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.27.0","versionType":"semver"},{"version":"0f17d789fe8c29b41e47663be82514aaca3a4dfb","status":"affected","versionType":"git"}]}],"references":[{"url":"https://github.com/ArtifexSoftware/mupdf/releases/tag/1.27.0","tags":["release-notes"]},{"url":"https://github.com/ArtifexSoftware/mupdf/commit/0f17d789fe8c29b41e47663be82514aaca3a4dfb","tags":["patch"]},{"url":"https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/commit/?id=0f17d789fe8c29b41e47663be82514aaca3a4dfb","tags":["issue-tracking"]},{"url":"https://www.vulncheck.com/advisories/mupdf-mutool-ansi-injection-via-metadata","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"MEDIUM","baseScore":4.8,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"NONE","baseSeverity":"LOW","baseScore":3.3,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-150","lang":"en","description":"CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-14T20:00:27.664Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:artifex:mupdf:*:*:*:*:*:*:*:*","versionEndExcluding":"1.27.0"},{"vulnerable":true,"criteria":"cpe:2.3:a:artifex:mupdf:*:*:*:*:*:*:*:*"}]}]}],"credits":[{"lang":"en","value":"Niel Duysters","type":"finder"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-16T13:53:13.801290Z","id":"CVE-2026-40505","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-16T13:53:40.763Z"}}]}}}