Home/Research/Post

GHSA-vxf9-vwp6-2w43: openssl-encrypt sequential XOR cancels the last key-derivation stage

  • Severity: MEDIUM
  • CVE: CVE-2026-74871
  • Ecosystems: pip
  • Packages: openssl_encrypt

## Summary

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.

## Exploitability — preconditions (important)

The flaw cancels **only the last stage** of the derivation. It is exploitable **only when BOTH** of the following hold:

1. **Exactly one KDF** is configured (e.g. Argon2 alone), **and**
2. **No prior hashing** stage precedes it.

Only then does the cancellation remove the sole expensive stage, leaving just the initial `SHA256(pw‖salt)`.

**Neither condition is the default — so default-configured files are NOT exploitable:**

– The default uses **3 chained KDFs**, and **chained hash stages** are also on by default.
– With multiple stages the cancellation drops only the *last* one; the surviving earlier KDF/hash snapshots remain XOR’d into the key, so the derivation stays memory-hard. The work factor is marginally reduced (one trailing stage removed), **not** bypassed.

A file is therefore only at real risk if it was deliberately encrypted with a **single KDF and no preceding hash** — both departures from the shipped def…

Source: GitHub Security Advisories · 2026-12-03