CVE-2026-50642

Description

A flaw was found in diff-so-fancy. The application does not properly sanitize non-SGR (Select Graphic Rendition) terminal control sequences, allowing other control characters and escape sequences to pass through. An attacker can embed malicious control sequences in filenames, diff metadata, or file content, which are then rendered directly in the terminal when a user views the diff. This can lead to output manipulation, including filename spoofing and terminal screen clearing, and may result in unintended command execution through clipboard hijacking, potentially misleading users during code review.

Statement

diff-so-fancy as shipped in Fedora and EPEL is affected by this flaw.

Understanding the Weakness (CWE)

Access Control

Technical Impact: Bypass Protection Mechanism

In some cases, injectable code controls authentication; this may lead to a remote vulnerability.

Access Control

Technical Impact: Gain Privileges or Assume Identity

Injected code can access resources that the attacker is directly prevented from accessing.

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

When a product allows a user's input to contain code syntax, it might be possible for an attacker to craft the code in such a way that it will alter the intended control flow of the product. As a result, code injection can often result in the execution of arbitrary code. Code injection attacks can also lead to loss of data integrity in nearly all cases, since the control-plane data injected is always incidental to data recall or writing.

Non-Repudiation

Technical Impact: Hide Activities

Often the actions performed by injected control code are unlogged.

Frequently Asked Questions

Want to get errata notifications? Sign up here.