Skip to main content
← Vulnerabilities

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

Exploited
No known exploitation
Fix
Fixed in 1.23.0
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 1.23.0.

Published
Last modified
11/100 · provisional
Low (apache)
None on Exploit-DB, Metasploit or GitHub

Summary

Apache Commons Codec's GitIdentifiers class does not reject NUL bytes in tree entry names, so a crafted name can make two different directory trees receive the same Git tree identifier or SWHID. Only applications that build trees from names supplied by other sources, such as ZIP archive entries or names passed directly to the API, are exposed, because common file systems do not allow NUL bytes in file names.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

Read the original 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.

cve.now Index

11Pcve.now Index 11 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure?/25Unknown. No advisory context yet
  • Reach10/20Affects Maven packages
  • Severity1/10Rated low by apache
  • No patch0/5No signal

What would change the score

  • Would score about 66 if added to CISA KEV
  • Would score about 61 if CISA's SSVC rates exploitation active
  • Would score about 33 if advisories confirm default setups are exposed

What to do

  • Upgrade to a fixed version: 1.23.0.

Timeline

  1. CVE published
  2. First seen by cve.now1 day
  3. Record last updated

Affected versions

  • From 1.22.0 · fixed in 1.23.0

  • Apache Software Foundation Apache Commons Codec

    Version range not reported

Evidence 3

  1. Advisory
  2. Patch
  3. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-124077

Is CVE-2026-124077 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

Which versions are affected by CVE-2026-124077?

commons-codec:commons-codec (Maven): from 1.22.0 before 1.23.0.Source: cve.now feed data

How do I fix CVE-2026-124077?

Upgrade to a fixed version: 1.23.0.Source: cve.now feed data