Skip to content
OpenAdvisories
Medium · 4.3 CVE-2026-124077 EUVD-2026-120399GHSA-26mf-gqw6-894w

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

Published Nov 9, 2026 · Updated Nov 12, 2026 · Assigned by apache

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.

Affected products

VendorProductAffectedFixed
Apache Software Foundation Apache Commons Codec 1.22.0 – < 1.23.0 1.23.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 libcommons-codec-java No fix yet —
Ubuntu 26.04 LTS libcommons-codec-java No fix yet —
Ubuntu 24.04 LTS libcommons-codec-java No fix yet —
Ubuntu 22.04 LTS libcommons-codec-java No fix yet —
Ubuntu 20.04 LTS libcommons-codec-java No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS libcommons-codec-java No fix yet —
Ubuntu 16.04 LTS libcommons-codec-java No fix yet —
Ubuntu 14.04 LTS libcommons-codec-java No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed apache-commons-codec 1.23.0-1.1 openSUSE-SU-2026:12523-1

Advisories 2

References