CVE-2026-119078

Apache Commons Codec: Blake3 doFinalize is stateless; the documented KDF example derives identical keys

Published Nov 9, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Blake3 class in Apache Commons Codec incorrectly documents that consecutive doFinalize calls produce different results, while the implementation returns the same output each time. Code that expects new derived keys after each doFinalize therefore obtains identical keys, breaking separation between keys. This flaw can compromise confidentiality by providing attackers with predictable or duplicate keys derived from secrets.

Affected Systems

Apache Commons Codec library versions ranging from 1.16.0 up to, but not including, 1.23.0 are impacted. The defect exists in the implementation regardless of the host platform or programming language. Users employing these versions within any application that performs repeated doFinalize calls on the same Blake3 instance are potentially affected.

Risk and Exploitability

The vulnerability is a logical design flaw that does not expose a traditional attack vector such as remote code execution. The CVSS score of 9.1 indicates a high severity risk, while an EPSS score of <1% suggests a low probability of exploit in the wild. The issue is not listed in the CISA KEV catalog. The primary risk arises from developers incorrectly using the API, leading to identical keys and weakened cryptographic safeguards.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Examine your code for repeated doFinalize calls on a single Blake3 instance and modify logic to request a combined length in one call, then split the resulting output into separate keys as shown in the updated Javadoc. Alternatively instantiate a new Blake3 object for each key derivation.
  • Upgrade Apache Commons Codec to version 1.23.0 or later; note that upgrading alone does not fix affected code, so also apply the logic changes above.
  • Verify that derived keys are distinct by performing cryptographic checks or tests; add unit tests to assert that successive keys differ when derived from the same input data.

Generated by OpenCVE AI on November 15, 2026 at 08:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Type Values Removed Values Added
First Time appeared Apache
Apache commons Codec
Vendors & Products Apache
Apache commons Codec
Type Values Removed Values Added
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.
Title Apache Commons Codec: Blake3 doFinalize is stateless; the documented KDF example derives identical keys
Weaknesses CWE-1068
CWE-684
References
Weaknesses
  • CWE-1068

    Inconsistency Between Implementation and Documented Design

  • CWE-684

    Incorrect Provision of Specified Functionality

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Nov 12, 2026, 5:34 PM
Reserved
Oct 29, 2026, 1:10 PM
Status
Awaiting Analysis
Published
Nov 9, 2026, 8:18 PM
Modified
Nov 12, 2026, 6:17 PM