CVE-2026-50642
Last modified
CVE-2026-50642 is a medium-severity vulnerability rated 4.8/10 on the CVSS scale. 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. EPSS estimates a 0.30% chance of exploitation in the next 30 days.
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
Metrics
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/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| so-fancy | diff-so-fancy | <= 1.4.10 |
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-50642?
How severe is CVE-2026-50642?
How do I fix CVE-2026-50642?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-50636The RemoteControl API methods invite_participants and remind…8.8
- CVE-2026-50637Metrics::Any::Adapter::Statsd versions before 0.04 for Perl …8.2
- CVE-2026-50638Metrics::Any::Adapter::DogStatsd versions before 0.04 for Pe…9.1
- CVE-2026-50639Metrics::Any::Adapter::SignalFx versions before 0.04 for Per…6.5
- CVE-2026-5064Potential security vulnerabilities have been identified in t…8.5
- CVE-2026-50641Streamsoft Business Intelligence (BI) stores users' password…7.1
- CVE-2026-506438cc is vulnerable to an Out‑of‑Bounds Read due to improper h…5.1
- CVE-2026-50644SOPlanning is vulnerable to SQL injection in the audit reten…8.6
- CVE-2026-50645There is no restriction on the amount of attachment headers …7.5
- CVE-2026-50646Protection mechanism failure in .NET Framework allows an una…7.8
- CVE-2026-50647Loop with unreachable exit condition ('infinite loop') in Ac…7.5
- CVE-2026-50648Allocation of resources without limits or throttling in .NET…7.5
Are you affected by CVE-2026-50642?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
