CVE-2026-50642 affects all versions of diff-so-fancy through 1.4.10, exposing users to terminal escape injection when viewing diffs. CERT Polska reported that the tool strips only ANSI SGR sequences but fails to sanitize other control characters, including carriage returns and escape sequences such as OSC and CSI. An attacker can embed malicious sequences in filenames, diff metadata, or file contents so they are rendered directly in a victim's terminal during code review or diff inspection.
The flaw can be used to spoof filenames, clear terminal output, alter terminal state, inject clipboard content, and mislead reviewers; CERT Polska also warned that clipboard hijacking could contribute to unintended command execution. The issue was fixed in commit 9c81294 following coordinated disclosure, and the report credited Michał Majchrowicz and Marcin Wyczechowski of the AFINE Team.

See affected versions and whether adversaries are exploiting it.
2 events from the most recent confirmed update back to the earliest known activity.
CERT Polska published details of CVE-2026-50642, an improper sanitization flaw in diff-so-fancy affecting all versions through 1.4.10. The vulnerability allows terminal control sequences in filenames, diff metadata, or file contents to be rendered and abused for output manipulation and related attacks.
The issue was remediated in commit 9c81294 following coordinated disclosure. CERT Polska credited Michał Majchrowicz and Marcin Wyczechowski from the AFINE Team with the responsible disclosure.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
2 references tracked. Mallory keeps watching after this page renders.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.