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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | apache-commons-codec | 1.23.0-1.1 | openSUSE-SU-2026:12523-1 |
Advisories 2
- openSUSE-SU-2026:12523-1 apache-commons-codec-1.23.0-1.1 on GA media SUSE / openSUSE Security Updates · Nov 12, 2026
- WID-SEC-2026-4431 Apache Commons Codec: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 9, 2026