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 package | Versions | Reported by |
|---|---|---|
| jahlives openssl_encrypt | before 1.4.0 Not affected: 1.4.0 | CVE List, NVD |
| openssl-encrypt (PyPI) | before 1.4.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS: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 Database | Not scored CVSS:4.0 | CVSS: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
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
secretsmodule for cryptographically secure pixel selection - Use full 32-byte SHA-256 output as seed material
- Store the password in
SecureBytesinstead 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
| https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-vfgx-5q85-58q3 | advisory, mitigation, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/openssl-encrypt-before-weak-prng-steganography-pixel-selection | advisory, third-party-advisory | |
| https://github.com/jahlives/openssl_encrypt/commit/09e96e090417d34d2f533f6810d3cd4f77810101 | web | |
| https://github.com/jahlives/openssl_encrypt | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74874 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vfgx-5q85-58q3 changed 2026-09-02 | CC-BY-4.0 |
| NVD | CVE-2026-74874 changed 2026-10-08 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3754 changed 2026-09-02 | CC-BY-4.0 |