GHSA-VFGX-5Q85-58Q3
openssl-encrypt has non-cryptographic PRNG used for steganography pixel selection
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 1.4.0 | openssl-encrypt · -28 d desde divulgación | |
| Divulgación | Publicada | GHSA-VFGX-5Q85-58Q3 divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice |
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 sequenceAdditionally, 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.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiopenssl-encrypt |
Corregida | 1.4.0 | -28 d | 1.4.9 no afectada |
1.4.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-vfgx-5q85-58q3https://github.com/jahlives/openssl_encrypt/commit/09e96e090417d34d2f533f6810d3cd4f77810101https://github.com/jahlives/openssl_encryptLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
