Skip to content
VulniPulse
Medium 2 vendors · 2 advisories

CVE-2026-124077: Apache Commons Codec: NUL bytes in tree entry names cause Git/SWHID identifier collisions (GitIdentifiers class)

CVE-2026-124077 key facts

CISA KEV
Not listed (catalogue checked )
Highest advisory rating
Medium
CVSS base score
4.3 (Apache), 3.7 (Red Hat)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N · base score 4.3, scored by CISA-ADPAttack vector: network. Attack complexity: low. Privileges required: none. User interaction: required. Scope: unchanged. Confidentiality impact: low. Integrity impact: none. Availability impact: none.
Weakness
  • CWE-158 Improper neutralization of null byte or NUL character
EPSS
0.36% chance of exploitation in the next 30 days (31st percentile). FIRST EPSS, .
CISA SSVC
Exploitation: none observed. Automatable: no. Technical impact: partial. CISA, .
Fixed releases
  • Apache: 1.23.0, 87f6aa2818836998528ff4b0d1ea35545a800ee5
Vendor advisories
2 from Apache, Red Hat
Assigned by
apache (CNA)
CVE record published
Listed by VulniPulse
Record changed

Ratings, versions and fixes are quoted from the vendor advisories that cover only CVE-2026-124077; each belongs to its advisory, not to every product listed. How records are collected and checked.

Am I affected by CVE-2026-124077?

The source names the versions below but does not confirm which products they belong to. Check the vendor advisory before you decide.

Versions namedFixed in
Apache: Apache Commons Codec 1.22.0 before 1.23.01.23.0
Apache: Apache Commons Codec 387120c901f4a75c3112dfdf8877dcdec7ae685d before 87f6aa2818836998528ff4b0d1ea35545a800ee587f6aa2818836998528ff4b0d1ea35545a800ee5
Red Hat: < 1.22.0No fixed release on this branch listed by the vendor
Red Hat: < 1.23.0No fixed release on this branch listed by the vendor

Description

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.

Text from the CVE.org record (apache).

How do I fix CVE-2026-124077?

Upgrade to a fixed release named by the vendor:

  • Apache: 1.23.0, 87f6aa2818836998528ff4b0d1ea35545a800ee5
  • Users are recommended to upgrade to version 1.23.0, which fixes the issue. (Apache)
  • Red Hat: no fixed package listed yet. (Red Hat)
  • Upstream fix: 1.23.0 (released upstream; not a Red Hat package). (Red Hat)

Vendor advisories for CVE-2026-124077

Apache

1 advisory
  • Advisory severityMedium4.3

    Medium [CVE-2026-124077] Apache Commons Codec: NUL bytes in tree entry names cause Git/SWHID identifier collisions (GitIdentifiers class)

    CVE-2026-124077Source published Source updated

    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…

    Affected products in this advisory
    • Apache Commons Codec
    Source-reported affected versions
    • Apache Commons Codec 1.22.0 before 1.23.0
    • Apache Commons Codec 387120c901f4a75c3112dfdf8877dcdec7ae685d before 87f6aa2818836998528ff4b0d1ea35545a800ee5
    Source-reported fixed versions
    • 1.23.0
    • 87f6aa2818836998528ff4b0d1ea35545a800ee5
    Mitigation guidance
    • Users are recommended to upgrade to version 1.23.0, which fixes the issue.

Red Hat

1 advisory
  • Advisory severityLow3.7

    Low [CVE-2026-124077] Identifier collision via unvalidated null bytes in tree entry names

    CVE-2026-124077Source published Source updated

    Identifier collision via unvalidated null bytes in tree entry names. Red Hat rates this low (CVSS 3.7). Weakness: CWE-140. Affected products named by the advisory: Cryostat 4; Exploit Intelligence; Migration Toolkit for Applications 8; OpenShift Developer Tools and Services; and 42 more.

    Related products — impact not confirmed
    • Cryostat 4
    • Exploit Intelligence
    • Migration Toolkit for Applications 8
    • OpenShift Developer Tools and Services

    42 more entries in the full advisory.

    Source-reported affected versions
    • < 1.22.0
    • < 1.23.0
    Source-reported fixed versions
    No fixed-version detail extracted. This does not mean no fix exists.
    Mitigation guidance
    • Red Hat: no fixed package listed yet.
    • Upstream fix: 1.23.0 (released upstream; not a Red Hat package).
    • Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

References

Timeline

  1. CVE record published
  2. First vendor advisory listed by VulniPulse
  3. CVE record last updated

All Apache advisories

Get an email when Apache publishes the next one.

See Apache's last 90 days first. Live alerts for one product are free for life; every vendor is US$5 a month with Pro (first month US$1).

Alert me about Apache