Skip to main content
VulnerabilityPublished

CVE-2026-50642: diff-so-fancy · Improper Encoding or Escaping of Output

Affects diff-so-fancySource CVE Database V5

0

Not known to be exploited · CVSS 4.8 Medium.

Data as of 28 Oct 2026, 05:11 UTC

CVSS 4.0 base score
4.8Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 13% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
so-fancydiff-so-fancyAffected
  • <=1.4.10
Fixed in–
GitHubdiff-so-fancypkg:github/diff-so-fancyOther threatsAffected
  • <=1.4.10
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available and has been implemented in the commit 9c81294. Users should upgrade diff-so-fancy to a version that includes this fix, i.e., any version later than 1.4.10. There is no indication that temporary mitigations or workarounds are provided; upgrading is the recommended remediation.

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

References

Community reviews

Loading reviews…