Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain write access to pipeline or shell environment
-
DeliveryModify diff3 invocation to set --diff-program to malicious script
-
ExploitMalicious script outputs crafted diff content
-
ExecutionInteger overflow corrupts line-mapping allocation size
-
PersistHeap buffer over-allocated boundary written
-
ImpactCrash 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
Local vector with high complexity because exploitation requires controlling --diff-program flag; user interaction needed to invoke diff3; no confidentiality impact per vendor scoring.
Primary rating from Vendor (CERT-PL).
CVSS VectorVendor: CERT-PL
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
EUVD-2026-47695
GHSA-9pwr-gcwm-8wj5
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB