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.
The flaw cancels only the last stage of the derivation. It is exploitable only when BOTH of the following hold:
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:
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 defaults.
format_version ∈ {8, 10}, produced by the --xor / --use-xor-composition option, and configured with a single KDF and no prior hashing.format_version 9; Independent XOR (v11/v13 with xor_mode=independent); streaming (v12); and any single-algorithm (non-XOR) configuration.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:
# xor_accumulator already contains the last stage's snapshot, then:
sequential_result = normalize(final_chain_value) # == last stage's snapshot
xor_accumulator.append(sequential_result) # XORs to 0 -> last stage cancels
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 earlier non-final stage snapshots.
SHA256(pw‖salt), independent of the configured KDF time/memory cost. Offline cracking proceeds at SHA-256 speed; the advertised memory-hardness provides no protection.This is a confidentiality weakness of data at rest: it does not expose plaintext directly, but for the affected non-default configuration it drastically lowers the work factor protecting weak/medium-strength passwords.
Resolved by introducing format_version 13, which carries an explicit xor_mode field and omits the redundant final append so every stage contributes to the key. --xor now writes v13 with xor_mode=sequential. Decrypt routing is keyed on the on-disk xor_mode field rather than the version number. The legacy v8/v10 derivation is intentionally preserved (append-only) so existing files still decrypt, but they remain weak until re-encrypted.
fdf0c6fc1c122790--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.openssl-encrypt info -i <file>.enc: look for xor_mode: sequential with format_version 8/10 and a single-KDF / no-hash derivation config.Found during an internal review of the XOR composition modes; fixed before any third-party disclosure. See SECURITY.md (ADVISORY 2026-02) and openssl_encrypt/docs/FORMAT.md §7.3 / §15 for the format-level details.
{
"cwe_ids": [
"CWE-916"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-03T22:52:57Z",
"nvd_published_at": null,
"severity": "MODERATE"
}