CVE-2026-74874
JSON

8.7high

openssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel Selection

Severity
8.7high CVSS:4.0 by VulnCheck
Exploit likelihood
0.26% (higher than 18% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-vfgx-5q85-58q3PYSEC-2026-3754

Description

openssl_encrypt versions before 1.4.0 use Python's non-cryptographic random module for steganographic pixel selection in the generate_pseudorandom_sequence function. Attackers who know the password can recover the Mersenne Twister state from approximately 624 outputs and predict pixel locations containing hidden data for extraction.

Affected

Product or packageVersionsReported by
jahlives openssl_encryptbefore 1.4.0
Not affected: 1.4.0
CVE List, NVD
openssl-encrypt (PyPI)before 1.4.0GitHub Advisory Database, PyPA Advisory Database

All scores

VulnCheck8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
VulnCheck7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Classification

CWE-330CWE-338

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

openssl_encrypt versions before 1.4.0 use Python's non-cryptographic random module for steganographic pixel selection in the generate_pseudorandom_sequence function. Attackers who know the password can recover the Mersenne Twister state from approximately 624 outputs and predict pixel locations containing hidden data for extraction.

GitHub Advisory Database
Summary

The generate_pseudorandom_sequence() function in openssl_encrypt/plugins/steganography/core/utils.py at lines 89-91 uses Python's random module (Mersenne Twister) for steganographic pixel/sample selection.

Affected Code
random.seed(seed)
sequence = random.sample(range(max_value), min(length, max_value))
return sequence

Additionally, the steganography password is stored as a plain Python string (not SecureBytes) and only 8 bytes (64 bits) of the SHA-256 hash are used for the seed, reducing effective security to 64 bits.

Impact

The Mersenne Twister's state can be recovered from approximately 624 outputs. An attacker who knows or guesses the password can predict the PRNG sequence and determine exactly which pixels contain hidden data, potentially extracting the hidden data without the password.

Recommended Fix
  • Use HMAC-DRBG or secrets module for cryptographically secure pixel selection
  • Use full 32-byte SHA-256 output as seed material
  • Store the password in SecureBytes instead of a plain string
Fix

Fixed in commit 09e96e0 on branch releases/1.4.x — replaced random.seed(hash(password)) with HMAC-SHA256 based CSPRNG (Fisher-Yates shuffle) and numpy Generator with HMAC-derived seeds across all steganography format modules.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-74874 changed 2026-10-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-vfgx-5q85-58q3 changed 2026-09-02CC-BY-4.0
NVDCVE-2026-74874 changed 2026-10-08Public domain
PyPA Advisory DatabasePYSEC-2026-3754 changed 2026-09-02CC-BY-4.0