{"id":"CVE-2026-50642","url":"https://www.cyber-defence.io/tools/cve/CVE-2026-50642","generatedAt":"2026-10-28T10:36:43.232Z","title":"The application only strips ANSI SGR sequences while allowing other control characters, including carriage return (\\r) and escape sequences (e.g., OSC, CSI), to pass through unsanitized.","description":"diff‑so‑fancy does not properly sanitize non‑SGR terminal control sequences before outputting diff data. The application only strips ANSI SGR sequences while allowing other control characters, including carriage return (\\r) and escape sequences (e.g., OSC, CSI), to pass through unsanitized.\n\nAn attacker can embed malicious control sequences in filenames, diff metadata, or file content that are rendered directly in the terminal during diff viewing. This can lead to output manipulation, including filename spoofing, terminal screen clearing, and clipboard injection via supported escape sequences.\n\nSuccessful exploitation may mislead users during code review, alter terminal state, or result in unintended command execution through clipboard hijacking.\n\nThis issue has been fixed in the commit 9c81294","published":"2026-07-29T11:16:50.000Z","lastModified":"2026-10-23T23:10:00.000Z","status":"Deferred","sourceIdentifier":"cvd@cert.pl","cvss":{"version":"4.0","score":4.8,"severity":"MEDIUM","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/M"},"cwe":["CWE-116"],"affected":[],"epss":{"score":0.00229,"percentile":0.13579,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"low","text":"Lower severity and a low EPSS score (0.23%). Track it; it rarely justifies an emergency change on its own."},"changes":[],"references":[{"url":"https://cert.pl/posts/2026/07/CVE-2026-41874/","source":"cvd@cert.pl"},{"url":"https://github.com/so-fancy/diff-so-fancy","source":"cvd@cert.pl"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-50642","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}