CVE-2026-50642

Terminal Escape Injection in diff‑so‑fancy

MEDIUM
4.8
CVSS Score
Published: July 29, 2026 at 09:46 AM UTC
Updated: October 23, 2026 at 11:10 PM UTC
1 product affected across 1 vendorDiff So Fancy

Using diff-so-fancy by so-fancy?

Get instant alerts when new vulnerabilities affect diff-so-fancy - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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. An 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. Successful exploitation may mislead users during code review, alter terminal state, or result in unintended command execution through clipboard hijacking. This issue has been fixed in the commit 9c81294

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0 ≤ v ≤ 1.4.100

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

References (2)

Third Party Advisory
Source: cverecord
https://cert.pl/posts/2026/07/CVE-2026-41874/

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.8MEDIUMCERT-PL
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-116

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card