🔐 CVE Alert

CVE-2026-50642

UNKNOWN 0.0

Terminal Escape Injection in diff‑so‑fancy

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

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

CWE CWE-116
Vendor so-fancy
Product diff-so-fancy
Published Jul 29, 2026
Last Updated Jul 29, 2026
Stay Ahead of the Next One

Get instant alerts for so-fancy diff-so-fancy

Be the first to know when new unknown vulnerabilities affecting so-fancy diff-so-fancy are published — delivered to Slack, Telegram or Discord.

Get Free Alerts → Free · No credit card · 60 sec setup

Affected Versions

so-fancy / diff-so-fancy
0 ≤ 1.4.10

References

NVD ↗ CVE.org ↗ EPSS Data ↗
cert.pl: https://cert.pl/posts/2026/07/CVE-2026-41874/ github.com: https://github.com/so-fancy/diff-so-fancy

Credits

Michał Majchrowicz (AFINE Team) Marcin Wyczechowski (AFINE Team)