CVE-2026-50642: diff‑so‑fancy does not properly sanitize non‑SGR terminal control sequences before outputting diff data
20
Routine
MEDIUM 4.8
CVE-2026-50642 is a medium-severity flaw (CVSS 4.8) affecting affected software. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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. An attacker can embed malicious control sequences in filenames, diff metadata, or file content that are rendered directly in the terminal during diff viewing
Why this priority
- No elevated risk signals yet
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 4.8 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Passive |
| EPSS exploit chance | 0.2% (top 87%) |
| CISA exploited list | No |
| Weakness | CWE-116 |
| Published | 2026-07-29 |
| Last modified | 2026-10-23 |
Publisher (CNA): CERT.PL
Timeline
- Published CVE record published
- Updated Record last modified
Advisories and coverage
Official advisories
- CERT Polska: Vulnerability in diff-so-fancy software 2026-07-29
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.