Apache Commons Codec GitIdentifiers flaw lets distinct trees share a Git/SWHID identifier (CVE-2026-124077)
According to oss-security, CVE-2026-124077 affects the GitIdentifiers class in Apache Commons Codec 1.22.0 before 1.23.0 and a listed development snapshot. The advisory rates it low and reports no active exploitation.
ApacheWebVulnerabilitiesKey points
- Apache Commons Codec 1.22.0 up to but not including 1.23.0 is affected, plus a listed development snapshot.
- Two different directory trees could share one Git tree identifier or SWHID because NUL characters are accepted in entry names.
- Trees created by scanning a file system are unaffected; archive entries and API-supplied names are the exposed inputs.
- The advisory rates the issue low, reports no active exploitation, and points to version 1.23.0 as the fix.
The oss-security mailing list reports that CVE-2026-124077 affects the GitIdentifiers class in Apache Commons Codec. The class accepts NUL characters in tree entry names, although Git uses that character as an end-of-name marker. As a result, two different directory trees can produce the same Git identifier or SWHID value.
The Apache Commons Codec releases from 1.22.0 before 1.23.0 are listed as affected, along with a development snapshot spanning commit 387120c901f4a75c3112dfdf8877dcdec7ae685d to commit 87f6aa2818836998528ff4b0d1ea35545a800ee5. The advisory rates severity as low.
Trees built by walking a local file system should not be affected, because common file systems forbid NUL characters in file names. Exposure is limited to applications that build trees from externally supplied names, such as entries in ZIP or other archive formats that permit NUL characters, or from values passed directly to the API. The report describes no active exploitation. The fix is in version 1.23.0, and a patch commit is available in the project's GitHub repository. Readers should consult the original oss-security post for full details.
What to do
- Upgrade Apache Commons Codec to version 1.23.0 in any application that uses the GitIdentifiers class.
- Check whether your application builds Git trees or SWHID values from names taken from ZIP or other archive entries, or from values passed directly to the API.
- If you use a development snapshot between the listed commits, replace it with a release that includes the fix.
Original report
“CVE-2026-124077: Apache Commons Codec: NUL bytes in tree entry names cause Git/SWHID identifier collisions (GitIdentifiers class)”
Posted by Gary D. Gregory on Nov 09 Severity: low Affected versions: - Apache Commons Codec 1.22.0 before 1.23.0 - Apache Commons Codec 387120c901f4a75c3112dfdf8877dcdec7ae685d before 87f6aa2818836998528ff4b0d1ea35545a800ee5 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…
Vulnerabilities mentioned
- Retired Apache Submarine Has Critical API Authorization Bypass (CVE-2026-129817) With No Fix Planned
- JTL-Shop Backup Files Exposed via .htaccess Misconfiguration
- Contact form plugin for WordPress: unauthenticated arbitrary file upload via copyfiles (CVE-2026-115867)
- Apache Shiro ActiveDirectoryRealm Flaw Allows Login With Empty Username (CVE-2026-137686)
- CVE-2026-120353: Apache Airflow Standard provider, Apache Airflow CNCF Kubernetes provider, Apache Airflow Common SQL provider, Apache Airflow Common Ai provider: Code execution on the worker via Jinja in Dag run conf or task arguments passed to @task.bash and similar TaskFlow decorators