/

CVE-2026-74889

Severity:

CRITICAL RISK

(9.8)

Weak Key Derivation (CWE-326) in openssl_encrypt API

CVE-2026-74889

Analyzed

Vulnerability type

Category:

Inadequate Cryptographic Strength

CWE:

CWE-326

Impact:

Weakening of Cryptographic Protection

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

openssl_encrypt versions before 1.4.0 normalize keys with HKDF using no salt and a static info parameter, reducing the effectiveness of entropy extraction. When attackers can influence or observe repeated derivations with identical inputs, predictable output may weaken cryptographic protection across multiple targets.

Affected context

The issue occurs in openssl_encrypt key-normalization functions when the implementation derives cryptographic material through HKDF without a per-operation salt and with a fixed info value. Deployments may be exposed when attacker-influenced or low-entropy keys are normalized repeatedly across multiple encryption targets, particularly where derived keys are expected to provide independent protection.

Exploit preconditions

  • Attack surface: Applications or services that invoke the affected key-normalization functions
  • Required access: Ability to influence, obtain, or compare inputs and outputs involved in repeated key derivation; the exact access depends on the integrating application
  • Trigger point: Key normalization performed before encryption or related cryptographic operations
  • Why exploitation is possible: Identical inputs can produce deterministic derived material because HKDF is used without a salt and with static context information, reducing separation between derivation operations

Why this happens

The underlying weakness is inadequate cryptographic strength caused by insufficient domain separation and entropy extraction during key derivation. Using HKDF with no salt and a static info parameter can make derivation deterministic for identical inputs and reduce the independence expected between derived keys. This maps to CWE-326 because the cryptographic design does not provide sufficient strength against relevant multi-target analysis.

Potential impact

  • Attackers may be able to identify relationships between derived keys across targets.
  • Cryptographic protections may be weakened when input keys have limited entropy.
  • Confidentiality of data protected with affected derived keys could be reduced.
  • Multi-target attacks could become more practical under favorable conditions.
  • Applications may experience broader compromise if the same derivation pattern protects multiple security boundaries.

General mitigation guidance

Mitigation generally focuses on strengthening key-derivation design and reducing

reuse of derivation context.

Common defensive patterns include:

  • Using a cryptographically appropriate, operation-specific salt where the protocol permits it.
  • Applying distinct, context-bound information values for separate algorithms, purposes, tenants, or targets.
  • Reducing reliance on attacker-controlled or low-entropy key material.
  • Enforcing minimum key-quality requirements before normalization.
  • Avoiding reuse of derived keys across independent security boundaries.
  • Limiting privileges and access to encryption services and protected key material.
  • Preserving compatibility and key-rotation controls when changing derivation behavior.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis and code review rules identifying HKDF calls with constant or empty salt values.
  • Review of fixed info parameters used across multiple cryptographic purposes or tenants.
  • Tests verifying that independent derivation contexts produce independent outputs.
  • Policy checks requiring approved key-derivation parameters and minimum input entropy.
  • Runtime telemetry for repeated derivation requests using identical key material across targets.
  • Automated security review tools that flag cryptographic APIs configured with weak or reusable context values.

Sources

SourceLink
github.comgithub.com/jahlives/openssl_encrypt/security/advisories/GHSA-j9mh-57cc-665x
vulncheck.comvulncheck.com/advisories/openssl-encrypt-before-weak-key-derivation-via-hkdf

Frequently asked

questions

Not by itself. Exploitation generally depends on an application exposing the affected derivation behavior and allowing an attacker to influence, observe, or compare relevant inputs and outputs.

It depends on the integrating application. Authentication, tenant isolation, API exposure, and access to encrypted data determine whether the derivation weakness can be exercised or analyzed.

Use a robust, context-separated key-derivation design with appropriate salt handling, strong input keys, and distinct derivation parameters for independent purposes.

Establish cryptographic parameter policies, review key-derivation usage during code review, test for cross-target key separation, and avoid reusing deterministic derivation contexts across security boundaries.

Find out what's already
exploitable in your codebase.