GHSA-RVC2-5JXQ-GPCJ
Camellia test mode disables HMAC authentication via environment variable
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RVC2-5JXQ-GPCJ 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: HIGH
Summary
The `CamelliaCipher` in `openssl_encrypt/modules/crypt_core.py` detects test mode via `os.environ.get("PYTEST_CURRENT_TEST")` at line 845. When in test mode:
- Encryption returns ciphertext without the HMAC tag (line 890)
- Decryption processes data without HMAC verification (lines 944-952)
Affected Code
# crypt_core.py:845
self._test_mode = bool(os.environ.get("PYTEST_CURRENT_TEST"))
# crypt_core.py:888-890 (encryption skips HMAC)
if self._test_mode:
return ciphertext
# crypt_core.py:944-952 (decryption skips HMAC verification)
if self._test_mode:
# In test mode, process without HMACImpact
Any process running with the `PYTEST_CURRENT_TEST` environment variable set will produce unauthenticated ciphertext. Setting an environment variable is trivial for an attacker who has code execution, effectively disabling all Camellia integrity protection.
Recommended Fix
- Remove the test mode bypass — tests should use the same HMAC path as production
- If test convenience is needed, use a compile-time constant, not a runtime environment variable
Fix
Fixed in commit `6cf0e62` on branch `releases/1.4.x` — removed test mode bypass; HMAC is now always generated and verified.
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-rvc2-5jxq-gpcjLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
