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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Apache Software Foundation | Apache Commons Codec | 1.16.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 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | javapackages-bootstrap | No fix yet | — |
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