/

CVE-2026-74888

Severity:

HIGH RISK

(7.5)

Weak PBKDF2 Construction (CWE-327) in openssl_encrypt

CVE-2026-74888

Analyzed

Vulnerability type

Category:

Weak Cryptographic Algorithm

CWE:

CWE-327

Impact:

Password Cracking and Loss of Confidentiality

Severity:

HIGH RISK

(7.5)

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

Versions of openssl_encrypt before 1.4.0 use a non-standard PBKDF2 construction that performs one iteration per call inside an outer loop. This can weaken password-derived encryption keys and may allow attackers to crack passwords protecting legacy encrypted files more efficiently than with standard, properly parameterized PBKDF2.

Affected context

The issue can affect applications that use vulnerable openssl_encrypt versions to derive encryption keys from passwords, particularly when protecting legacy encrypted files. Risk depends on the use of password-based encryption, the construction's effective work factor, password strength, and whether an attacker can obtain encrypted data for offline analysis.

Exploit preconditions

  • Attack surface: Password-based encryption of application data or files
  • Required access: Access to ciphertext and any required encryption metadata; online access to the application is not necessarily required
  • Trigger point: Offline password-guessing against data encrypted with the non-standard KDF
  • Why exploitation is possible: The construction does not provide the formally analyzed security properties and work-factor behavior expected from standard PBKDF2 usage, allowing guesses to be evaluated more efficiently

Why this happens

The underlying bug is the use of a non-standard key derivation construction that invokes PBKDF2 with a single iteration per call inside an outer loop. Although the implementation may appear to increase work through repetition, this arrangement does not necessarily provide the same security guarantees as a standard PBKDF2 operation with a properly selected iteration count.

This maps to CWE-327: Use of a Broken or Risky Cryptographic Algorithm, because the implementation relies on a cryptographic construction whose security properties are not established in the intended way and may reduce resistance to password-guessing attacks.

Potential impact

  • Attackers may recover passwords protecting legacy encrypted files
  • Confidential application data may be disclosed
  • Recovered passwords could enable access to other systems or accounts if reused
  • Organizations may face increased exposure from long-lived encrypted archives

General mitigation guidance

Mitigation generally focuses on replacing non-standard password-based encryption with well-analyzed constructions and reducing reliance on weak or reused passwords.

Common defensive patterns include:

  • Using standard KDF APIs with documented, calibrated work factors
  • Considering memory-hard password derivation where the application and format support it
  • Re-encrypting legacy files after successful authentication using the stronger construction
  • Generating independent salts for each encrypted object
  • Reducing trust in user-supplied KDF parameters by applying bounded, policy-controlled settings
  • Separating encryption keys from passwords through managed key-encryption keys where practical
  • Limiting process and storage privileges for services handling decrypted content

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis for PBKDF2 calls configured with a single iteration or wrapped in custom repetition loops
  • Code review of password-to-key conversion and legacy encryption-format handling
  • Dependency and API inventory checks for vulnerable openssl_encrypt versions
  • Tests that compare implemented parameters and serialization formats with approved cryptographic policies
  • Policy enforcement requiring reviewed, standard KDF constructions and minimum work-factor requirements

Automated software composition analysis and cryptographic linting tools may help surface affected dependencies and unusual KDF patterns.

Sources

SourceLink
github.comgithub.com/jahlives/openssl_encrypt/security/advisories/GHSA-743f-89fg-x288
vulncheck.comvulncheck.com/advisories/openssl-encrypt-before-non-standard-pbkdf2-key-derivation

Frequently asked

questions

Usually not as a direct remote code execution issue. An attacker generally needs ciphertext and enough information about the encryption format to perform offline password-guessing.

Not necessarily. If encrypted files can be obtained independently, online authentication may not be required; password strength and ciphertext exposure are central factors.

Use a standard, well-analyzed password-based KDF with a calibrated work factor, then migrate legacy encrypted data to a stronger format when it is accessed or revalidated.

Centralize approved cryptographic APIs, prohibit custom KDF constructions, review parameter choices through security policy, and test encryption formats for resistance to offline guessing.

Find out what's already
exploitable in your codebase.