Skip to main content

Apache Commons Codec EUVDEUVD-2026-120399

| CVE-2026-124077 MEDIUM
Improper Neutralization of Null Byte or NUL Character (CWE-158)
2026-11-09 security@apache.org GHSA-26mf-gqw6-894w
4.3
CVSS 3.1 · Vendor: apache
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted archive/API name with NUL byte
  2. Delivery
    Application builds tree via GitIdentifiers
  3. Exploit
    Two distinct trees serialize identically
  4. Execution
    Colliding Git tree ID / SWHID produced
  5. Impact
    Integrity or deduplication guarantee bypassed

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Metacharacter neutralization
Exploitation Conditions

Exploitation requires the consuming application to build Git trees using Apache Commons Codec's GitIdentifiers/TreeIdBuilder API from entry names that originate from a source permitting NUL bytes - specifically archive formats like ZIP, or names passed directly to the API - rather than from a file-system walk. This is the key limiting factor: trees built by walking a normal file system are NOT affected, because common file systems disallow NUL in file names, so default/typical usage is safe. Additional limits: only versions 1.22.0 through pre-1.23.0 contain the vulnerable class, the attacker must influence the entry names fed to the API (UI:R), and the attacker must be able to craft a name whose NUL truncation yields a colliding tree serialization. No authentication to the library is required (PR:N), but a specific, non-default integration where untrusted names reach the tree builder is mandatory.

Impact

This is a genuinely low-priority issue by every available signal, and they are consistent rather than conflicting. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N, base 4.3 Medium) describes a network-reachable but user-interaction-dependent flaw with only Low confidentiality impact and no integrity or availability impact. EPSS is 0.24% (16th percentile), indicating very low predicted exploitation likelihood. The vuln.today decision label is 'this_month' (routine remediation, not act_now/emergency). There is no CISA KEV listing and no public exploit identified - the only GitHub reference is the vendor fix commit, not a working exploit. Note a modeling tension worth flagging: NVD scored the impact as C:L (confidentiality), but the described mechanism is a tree-identifier/SWHID collision, which is fundamentally an integrity-of-uniqueness problem rather than data disclosure - the single Low impact dimension is defensible but arguably mislabeled as confidentiality. The description also explicitly narrows exposure: common file systems forbid NUL in file names, so the realistic attack surface is limited to applications that build Git trees from externally supplied names (e.g., ZIP entries or direct API calls). Net: a real but minor correctness/integrity bug, not an urgent security priority.

Exploit ScenarioDerived

An application uses Apache Commons Codec 1.22.0's GitIdentifiers/TreeIdBuilder to compute Git tree IDs or SWHIDs from entry names taken from an untrusted source such as a ZIP archive, where NUL bytes are permitted in names. An attacker crafts an entry name containing a NUL byte so that one tree serializes to the same bytes - and therefore the same identifier - as a different, benign tree, defeating a system that relies on that identifier for deduplication, integrity, or content addressing. No public exploit code is identified; exploitation also requires the victim application to feed attacker-influenced names into the API (UI:R).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 12, 2026

Apache Commons Codec 1.22.0 through pre-1.23.0 contains a Git tree-identifier ambiguity in its GitIdentifiers/TreeIdBuilder API: entry names containing NUL bytes were not rejected, so a crafted name can truncate at the NUL and make one serialized tree byte-identical to a different tree, yielding the same Git tree hash or SWHID for two distinct directory trees. Impact is limited to applications that build trees from externally supplied names - for example entries of ZIP archives or names passed straight into the API - while trees built by walking a normal file system are unaffected, since common file systems forbid NUL in file names. Exposure is further constrained by the assessed vector (AC:H, UI:R) and a low EPSS score (0.24%, 16th percentile); there is no CISA KEV listing and no public exploit code identified at time of analysis, and the vendor has released a fix in 1.23.0.

RemediationAI

Upgrade to Apache Commons Codec 1.23.0, which contains the fix for this issue (vendor-released patch: 1.23.0; upstream commit 87f6aa2818836998528ff4b0d1ea35545a800ee5, patch at https://github.com/apache/commons-codec/commit/87f6aa2818836998528ff4b0d1ea35545a800ee5.patch, with the advisory at https://lists.apache.org/thread.html/zns7tbnkq685prps9d85q7ct6oobvzsm). If upgrading cannot be done immediately, the actionable stopgap is to validate or sanitize every entry name before it reaches TreeIdBuilder: reject names that are empty, '.', '..', contain '/' or a NUL character ('\0'), or contain unpaired surrogates, and refuse inputs that create a file/directory name conflict - the same checks the 1.23.0 code adds. The trade-off is that archives (for example ZIP files) legitimately carrying NUL bytes in entry names can no longer be processed and will be rejected rather than silently mapped to an ambiguous tree, so error handling must be prepared for IllegalArgumentException. Organizations that only compute tree identifiers by walking a local file system are not affected by this flaw and can schedule the upgrade on their normal dependency-refresh cadence.

Affected VersionsENISA

Apache Commons Codec 387120c901f4a75c3112dfdf8877dcdec7ae685d <87f6aa2818836998528ff4b0d1ea35545a800ee5
Apache Commons Codec 1.22.0 <1.23.0

Affected Packages

euvd apache_commons_codec fix: 1.23.0

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

Git tree objects serialize each entry as a mode string, a space, the entry name terminated by a NUL byte, followed by the raw object identifier of the referenced blob or subtree; the tree's own identifier is the hash over that exact byte stream. Because the NUL is the field terminator, an entry name that itself contains a NUL byte produces a byte stream that can be parsed as a different set of entries than were intended, so two logically different directory trees can hash to the same tree identifier (and therefore the same SWHID). The root cause class is CWE-158, Improper Neutralization of Null Byte or NUL Character: the library validated only for '/' when constructing DirectoryEntry names, leaving NUL and other malformed names to flow into the serializer. The upstream commit 87f6aa2 introduces requireValidName, which rejects names that are empty, '.', '..', contain '/' or '\0', or contain unpaired surrogates that cannot be UTF-8 encoded, and applies it to both file and directory path components; the same change also rejects file/directory name conflicts to prevent ambiguous tree serialization. The affected component exists only in the 1.22.0 line (EUVD lists the range from 1.22.0 up to, but not including, 1.23.0, and equivalently the commit range 387120c… to 87f6aa2…).

Know when the next one hits your stack

  • 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 (apache) PRIMARY 4.3 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
vuln.today AI 3.1 LOW

No auth needed (PR:N) but success requires a non-default usage feeding untrusted NUL-bearing names plus crafting a collision (AC:H, UI:R); the effect is an identifier collision, so I:L and C:N/A:N.

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

Primary rating from Vendor (apache).

CVSS VectorVendor: apache

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Lifecycle Timeline

4
CVSS changed
Nov 12, 2026 - 18:22 NVD
4.3 (MEDIUM)
Patch available
Nov 09, 2026 - 21:02 EUVD
CVE Published
Nov 09, 2026 - 20:18 cve.org
UNKNOWN (no severity yet)
CVE Published
Nov 09, 2026 - 20:18 cve.org
MEDIUM 4.3

DescriptionCVE.org

The GitIdentifiers class in Apache Commons Codec did not reject NUL bytes in tree entry names. Because Git uses a NUL byte to mark the end of each entry name in a tree object, a crafted name could make one tree serialize to the same bytes as a different tree. Two different directory trees could then receive the same Git tree identifier or SWHID.

The impact is limited: common file systems do not allow NUL bytes in file names, so trees built by walking a file system are not affected. Only applications that build trees from names supplied by other sources, such as entries of archive formats that permit NUL bytes in names (e.g. ZIP) or names passed directly to the API, are exposed.

This issue affects Apache Commons Codec: from 1.22.0 before 1.23.0.

Users are recommended to upgrade to version 1.23.0, which fixes the issue.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
Ubiquitous Java library, but only the narrow 1.22.0-1.23.0 window and niche GitIdentifiers feature are affected
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

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