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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | openssl-encrypt | < 1.4.0 | 1.4.0 |
Referencias
- https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-vfgx-5q85-58q3
- https://www.vulncheck.com/advisories/openssl-encrypt-before-weak-prng-steganography-pixel-selection
- https://github.com/jahlives/openssl_encrypt/commit/09e96e090417d34d2f533f6810d3cd4f77810101
- https://github.com/jahlives/openssl_encrypt
- Vector CVSS
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- Debilidad (CWE)
CWE-330- Plataforma
- Python (PyPI)
- Paquete
openssl-encrypt- Publicada
- 31.03.2026
- Actualizado
- 11.10.2026 15:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-3754 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-vfgx-5q85-58q3 - CC BY 4.0
Historial de vulnerabilidades: openssl-encrypt
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 60
- Primera → última
- 03.2026 08.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Crítica 2
- Alta 1
- Media 15
- Sin evaluar 42
Divulgaciones por año
- 2026: 60
-
openssl-encrypt has non-cryptographic PRNG used for steganography pixel selection esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.