CVE-2026-74874
openssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel Selection
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.7
openssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel Selection
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.
- Record
CVE-2026-74874- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-338
- Updated
- 2026-11-02
EUVDEUVD-2026-60093
8.7
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.
- Record
EUVD-2026-60093- CVSS 4.0
- 8.7 High
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-844w-mwfp-wjwf
8.7
openssl_encrypt versions before 1.4.0 use Python's non-cryptographic random module for...
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.
- Record
GHSA-844w-mwfp-wjwf- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-338
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vfgx-5q85-58q3
6.6
openssl-encrypt has non-cryptographic PRNG used for steganography pixel selection
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.
- Record
GHSA-vfgx-5q85-58q3- CVSS 4.0
- 6.6 Medium
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 - Weakness
- CWE-330
- Updated
- 2026-11-02
NVD
8.7
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.
- Record
CVE-2026-74874- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-338
- Updated
- 2026-11-02
OSV
8.7
openssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel Selection
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.
- Record
CVE-2026-74874- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-338
- Updated
- 2026-11-02
OSVGHSA-vfgx-5q85-58q3
6.6
openssl-encrypt has non-cryptographic PRNG used for steganography pixel selection
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.
- Record
GHSA-vfgx-5q85-58q3- CVSS 4.0
- 6.6 Medium
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 - Weakness
- CWE-330
- Updated
- 2026-11-02
OSVPYSEC-2026-3754
8.7
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.
- Record
PYSEC-2026-3754- CVSS 4.0
- 8.7 High
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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
openssl-encryptPyPI |
before 1.4.0 | 1.4.0 |
openssl-encryptPyPI |
before 1.4.0, plus listed versions 0.2.20.2.30.2.40.2.50.2.6 Show 39 moreShow less0.3.00.3.10.3.20.3.30.4.00.4.10.4.20.4.30.4.40.5.00.5.10.5.30.6.0rc10.7.0rc20.7.10.7.20.8.00.8.10.8.20.9.21.0.01.0.11.0.21.0.31.1.01.2.01.2.11.3.01.3.11.3.21.3.31.3.41.3.51.4.0b31.4.0b41.4.0b51.4.0b61.4.0b71.4.0b8 |
1.4.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-74874 is a high vulnerability (CVSS 8.7) in Jahlives Openssl Encrypt, published March 31, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.44%, the 38th percentile. Fixed in openssl-encrypt 1.4.0.
References
github.com/jahlives/openssl_encrypt/security/advisories/GHSA-vfgx-5q85-58q3
vulncheck.com/advisories/openssl-encrypt-before-weak-prng-steganography-pixel-selection
nvd.nist.gov/vuln/detail/CVE-2026-74874
github.com/advisories/GHSA-844w-mwfp-wjwf
github.com/jahlives/openssl_encrypt/commit/09e96e090417d34d2f533f6810d3cd4f77810101
github.com/advisories/GHSA-vfgx-5q85-58q3
github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74874.json
github.com/jahlives/openssl_encrypt