Skip to main content

GNU diffutils CVE-2026-53910

| EUVDEUVD-2026-47695 LOW
Integer Overflow or Wraparound (CWE-190)
2026-07-22 CERT-PL GHSA-9pwr-gcwm-8wj5
2.1
CVSS 4.0 · Vendor: CERT-PL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain write access to pipeline or shell environment
  2. Delivery
    Modify diff3 invocation to set --diff-program to malicious script
  3. Exploit
    Malicious script outputs crafted diff content
  4. Execution
    Integer overflow corrupts line-mapping allocation size
  5. Persist
    Heap buffer over-allocated boundary written
  6. Impact
    Crash or potential code execution in diff3 process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to control the diff program executed by diff3, which is achievable via the --diff-program command-line flag pointing to a malicious or attacker-controlled script. This means the attacker must either: (1) have local access to invoke diff3 directly with arbitrary flags, (2) control or inject into a script or configuration that invokes diff3 with the --diff-program option, or (3) be in a position to influence the build/merge environment where diff3 is called automatically. The CVSS 4.0 AT:P (attack requirements present) metric confirms specific preconditions must be met. Exploitation is limited by the requirement that the victim environment actually uses diff3 with a user-configurable or attacker-influenced --diff-program path. Environments that invoke diff3 with hardcoded, trusted diff-program paths, or that do not use diff3 at all, are not exposed. No special network access or authentication is required once --diff-program control is obtained, but that control itself is the principal barrier.

Impact

The CVSS 4.0 base score of 2.1 (AV:L/AC:L/AT:P/PR:N/UI:N) reflects specific attack requirements (AT:P) that substantially limit real-world risk. Exploitation requires an attacker-controlled diff program to be set via --diff-program - a condition that implies either local shell access, social engineering of a developer/CI pipeline operator, or prior compromise of a build script. Confidentiality impact is scored VC:N even though RCE is described as a possibility; the vendor and scorer appear to treat full code execution as conditional on environment, opting for the more conservative VI:L/VA:L impact. No EPSS data was provided in the input, and no CISA KEV listing exists, meaning there is no known active exploitation. The subsequent-system impacts (SC:L/SI:L/SA:L in the provided CVSS 4.0 vector) suggest the scorer recognized risk to downstream systems such as CI/CD pipelines or automated merge tooling where diff3 may run with elevated pipeline privileges. The gap between 'potential RCE' in the description and the low CVSS score is notable: if the attacker can already set --diff-program to an arbitrary script, they may achieve equivalent impact through that script directly, making the heap overflow a secondary concern. Real priority is LOW for most environments, MEDIUM in automated build/merge pipelines where diff3 is invoked with user-controlled inputs.

Exploit ScenarioDerived

A threat actor with write access to a CI/CD pipeline configuration modifies a build script to invoke diff3 with --diff-program pointing to an attacker-supplied shell script; the script outputs specially crafted diff content designed to trigger signed integer overflow in diff3's line-mapping arithmetic, causing an undersized heap allocation and subsequent out-of-bounds write. Depending on heap layout and the environment's exploit mitigations, this could result in a crash that disrupts the build pipeline or, in environments with weak ASLR or no stack canaries, could be developed into code execution running as the pipeline service account. No public proof-of-concept exploit code was identified in the provided intelligence.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 22, 2026

Heap-based buffer overflow in GNU diffutils' diff3 tool, triggered by signed integer overflows in internal line-mapping arithmetic, enables crash and potential code execution when diff3 processes crafted diff output. Affected is the diff3 binary across diffutils versions tracked under CPE cpe:2.3:a:gnu:diffutils:*:*:*:*:*:*:*:*, where an attacker controlling the diff program invoked by diff3 (e.g., via the --diff-program option pointing to a malicious script) can induce miscalculated memory allocations followed by out-of-bounds writes. No public exploit identified at time of analysis and no CISA KEV listing; a fix is available via upstream commits reported by CERT-PL.

RemediationAI

The primary fix is to apply the upstream patches from the GNU diffutils Savannah repository: commit 9ff04d5b84743e331e80b589335a52c5480d1815 and commit 73ed7ce85cc78effb94daf028c9af6b4e5252e50 (https://cgit.git.savannah.gnu.org/cgit/diffutils.git/commit/?id=9ff04d5b84743e331e80b589335a52c5480d1815 and https://cgit.git.savannah.gnu.org/cgit/diffutils.git/commit/?id=73ed7ce85cc78effb94daf028c9af6b4e5252e50). Monitor your Linux distribution's security advisories for a packaged update incorporating these commits, as no tagged upstream release version has been confirmed yet - applying a distribution-provided package is preferred over patching from source for most environments. As a compensating control where patching is not immediately possible, restrict or audit use of the --diff-program flag in automated pipelines: if diff3 is invoked via CI/CD scripts, validate that --diff-program is not user-configurable and cannot be set to attacker-controlled paths; this eliminates the primary described attack vector without disabling diff3 entirely. Note that blocking the --diff-program option removes legitimate customization capability and may break workflows relying on alternative diff implementations.

Affected VersionsENISA

diffutils 0 ≤3.12

Affected Packages

euvd diffutils no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GNU diffutils provides the diff3 utility for three-way file comparison and merge, used widely in version control workflows and automated patch pipelines. The root cause is CWE-190 (Integer Overflow or Wraparound): signed integer arithmetic used for line-mapping and range calculations can overflow, yielding corrupt values that drive both memory allocation sizes and loop iteration bounds. This is a classic two-stage exploitation path - the overflow first causes an undersized heap allocation, then subsequent processing iterates over the expected (larger) range, writing beyond the allocated buffer. The affected CPE cpe:2.3:a:gnu:diffutils:*:*:*:*:*:*:*:* covers all diffutils versions until the patched commits. diff3's --diff-program flag, intended to allow a custom diff binary, is the described attack surface: by substituting a malicious script, an attacker fully controls the diff output fed into the vulnerable parsing logic.

Know when Diffutils gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CERT-PL) PRIMARY 2.1 LOW
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:L/SI:L/SA:L
vuln.today AI 3.6 LOW

Local vector with high complexity because exploitation requires controlling --diff-program flag; user interaction needed to invoke diff3; no confidentiality impact per vendor scoring.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L
4.0 AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:L/SC:L/SI:L/SA:L

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
Low

DescriptionCVE.org

diff3 tool from GNU diffutils is vulnerable to a heap‑based buffer overflow due to multiple signed integer overflows in line‑mapping calculations. Incorrect arithmetic in mapping line ranges can result in corrupted values being used for memory allocation and loop bounds. When processing crafted diff output, these overflows may cause the application to allocate insufficient memory and subsequently perform out‑of‑bounds writes during internal processing. An attacker who can control the output of the diff program used by diff3 (e.g. via --diff-program pointing to a malicious script) can trigger out-of-bounds writes, resulting in a crash and potentially remote code execution depending on the environment.

This issue has been fixed in commit 9ff04d5b84743e331e80b589335a52c5480d1815

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
standard utility shipped on virtually all Linux and Unix systems
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy