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

Status: published. Published: 2026-11-09. Updated: 2026-11-09.

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.

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: apache) — https://github.com/apache/commons-codec/commit/87f6aa2818836998528ff4b0d1ea35545a800ee5.patch

## Affected products and versions

- Apache Software Foundation / Apache Commons Codec (commons-codec:commons-codec): ≥ 1.22.0; < 1.23.0 (affected, maven). Source: CNA: apache
- Apache Software Foundation / Apache Commons Codec: ≥ 387120c901f4a75c3112dfdf8877dcdec7ae685d; < 87f6aa2818836998528ff4b0d1ea35545a800ee5 (affected, git). Source: CNA: apache

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-158

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/apache/commons-codec/commit/87f6aa2818836998528ff4b0d1ea35545a800ee5.patch (CNA: apache; patch)

- https://lists.apache.org/thread.html/zns7tbnkq685prps9d85q7ct6oobvzsm (CNA: apache; vendor-advisory)

## Provenance

- CNA: apache: https://www.cve.org/CVERecord?id=CVE-2026-124077; retrieved 2026-11-09; source updated 2026-11-09

Revision: 32caa4e3283ab1aa98af158d431ecb270c72cfb9c6681a79340ce2774a10daec

Canonical: https://y2.dev/cve/CVE-2026-124077

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.