GHSA-P3GQ-PCG9-QVFV
PQC simulation mode fallback uses weak deterministic shared secret
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-P3GQ-PCG9-QVFV divulgada | |
| Remediación | Parche 1.4.0 | openssl_encrypt · 21 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Severity: CRITICAL
Summary
In `openssl_encrypt/modules/pqc.py` at lines 1046-1138, if KEM decapsulation fails for any reason, the code silently falls back to a "simulation mode" that generates a deterministic shared secret from publicly available data and only 16 bytes of the private key.
Affected Code
# pqc.py:1085-1092 (simulation mode shared secret)
shared_secret = hashlib.sha256(encapsulated_key + public_key_part(private_key)).digest()
# pqc.py:44-54 (public_key_part returns first 16 bytes only)
def public_key_part(private_key):
return bytes(secure_private_key[:16])
# pqc.py:1133-1137 (falls back silently if real KEM fails)
if shared_secret is None:
shared_secret = simulation_secret
print("FALLING BACK TO SIMULATION MODE FOR DECRYPTION")Impact
- The `encapsulated_key` is publicly sent alongside ciphertext
- `public_key_part()` returns only the first 16 bytes of the private key
- An attacker who obtains 16 bytes of the private key can compute the shared secret and decrypt everything
- The fallback triggers silently on any KEM failure (library bug, version mismatch, corrupted key)
- No forward secrecy — same inputs always produce same output
Recommended Fix
- Remove the simulation mode fallback entirely
- If KEM decapsulation fails, raise a hard error — never silently degrade
- Remove the `public_key_part()` function
---
Resolution
Resolved in commit `472c088` on branch `feature/v1.4.x-development`.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiopenssl_encrypt |
Corregida | 1.4.0 | 21 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-p3gq-pcg9-qvfvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
