CVE-2026-119078
Apache Commons Codec: Blake3 doFinalize is stateless; the documented KDF example derives identical keys
Description
Apache Commons Codec's Blake3 class documented the output of its doFinalize methods as depending on any previously finalized bytes, so that consecutive calls would return different output. In fact, doFinalize does not change the hash state: calling it again without supplying more input returns the same bytes. The key-derivation example in the class Javadoc, shipped since 1.16.0, derives two keys with two consecutive doFinalize calls. Code that follows it gets identical keys, so the separation between the derived keys is lost. The same applies to any application that calls doFinalize more than once on one instance and expects new output each time.
This issue affects Apache Commons Codec from 1.16.0 before 1.23.0.
Version 1.23.0 corrects the documentation, but the behavior of doFinalize is unchanged. Upgrading alone does not fix affected code. Users should check their applications for repeated doFinalize calls on the same Blake3 instance and derive multiple keys by requesting the combined length in one call and splitting the output, as the updated Javadoc shows.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| commons-codec » commons-codecpreliminary | >= 1.16.0, < 1.23.0 | 1.23.0 |
Blast radius
81% of the dependent artifacts (32,235) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 128,217 |
| 2 hops | 437,954 |
| 3 hops | 514,256 |
| 4 hops | 280,809 |
| 5 hops | 104,180 |
| 6 hops | 20,485 |
Most used dependents
- org.apache.maven.plugins » maven-source-plugin87,037 usages
- org.apache.maven.plugins » maven-jar-plugin59,787 usages
- org.apache.felix » maven-bundle-plugin31,882 usages
- org.apache.maven.plugins » maven-assembly-plugin28,314 usages
- org.apache.maven.plugins » maven-dependency-plugin26,231 usages
- org.apache.maven.plugins » maven-shade-plugin18,801 usages
- org.apache.maven.plugins » maven-enforcer-plugin16,359 usages
- org.apache.maven.plugins » maven-checkstyle-plugin11,720 usages
- org.apache.maven.plugins » maven-site-plugin9,107 usages
- org.springframework.boot » spring-boot-maven-plugin8,665 usages
- org.apache.maven.plugins » maven-war-plugin6,519 usages
- org.apache.maven.plugins » maven-plugin-plugin6,502 usages
- org.apache.maven » maven-core6,117 usages
- org.codehaus.mojo » versions-maven-plugin5,371 usages
- org.apache.commons » commons-compress5,219 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
