PyPI
CVE-2026-74871
openssl-encrypt sequential XOR cancels the last key-derivation stage
- Severity
- Medium 6.2
- Published
- 3 Dec 2026
- Last changed
- 3 Dec 2026
- Added to UpHeron
- 3 Dec 2026
- Fixed in
- 1.4.8
- Weakness
- Weak password hashing (CWE-916)
- Attack
- Needs local access · No login needed · No user action needed
- Attacker can
- Read data
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Also known as
- GHSA-vxf9-vwp6-2w43, PYSEC-2026-3976
- Sources
- OSV.dev and GitHub
Description
Files encrypted in sequential XOR composition mode (--xor / --use-xor-composition, on-disk format_version 8 or 10) derive a key in which the last stage cancels out. The weakness is only security-relevant for a specific, non-default configuration (see Exploitability below). In that case the key derivation collapses to a single cheap SHA256(password ‖ salt), completely bypassing the configured memory-hard KDF (e.g. Argon2) and allowing offline password guessing at plain-SHA256 speed.
In sequential XOR mode the key is the XOR of every stage's normalized output snapshot. The code additionally appended the chain's final value to that accumulator — but the final value is identical to the last stage's own snapshot already present in the accumulator, so the two XOR to zero and the last stage drops out of the key:
The surviving key material is the initial hash snapshot SHA256(plaintext-password ‖ original-salt) — computed before the chain runs (not a derived/chained value) — XOR'd with any…
Workarounds
- Re-encrypt any --xor file that used a single KDF with no prior hashing — this is the only at-risk configuration. Re-encrypting with a patched build writes v13.
- Identify affected files with openssl-encrypt info -i .enc: look for xor_mode: sequential with format_version 8/10 and a single-KDF / no-hash derivation config.
- Default-configured files (3 chained KDFs + chained hashes), the default mode, and independent XOR were never at risk and need no action.
Affected software
| Software | Affected versions |
|---|---|
openssl-encryptPyPI · osv:PyPI:openssl-encrypt |
|
About openssl-encrypt
- Weekly downloads (PyPI)
- 280PyPI Stats, 3 Dec 2026
Vulnerabilities in openssl-encrypt
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-74870openssl-encrypt HSM diagnostics and debug logging expose hardware-derived dataLow 3 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-74871
- GitHub Advisory Database https://github.com/advisories/GHSA-vxf9-vwp6-2w43