GHSA-H45M-MGCP-Q388
openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart
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-H45M-MGCP-Q388 divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice |
Severity: HIGH
Summary
The TOTP brute-force rate limiter in `openssl_encrypt_server/modules/pepper/totp.py` at lines 47-98 uses an in-memory `defaultdict(list)` as a class variable.
Affected Code
class TOTPRateLimiter:
def __init__(self, ...):
self.attempts: Dict[str, List[datetime]] = defaultdict(list)
self.lockouts: Dict[str, datetime] = {}
class TOTPService:
_rate_limiter = TOTPRateLimiter() # Class variable, in-memory onlyImpact
- Rate limit state is not shared across multiple server instances/workers — an attacker can distribute attempts
- All rate limit state is lost on server restart — allows immediate retry
- In multi-worker deployments, each worker has independent rate limit state
Recommended Fix
- Use Redis or the database for rate limit state storage
- Or use a shared-memory approach for multi-worker deployments
- At minimum, persist lockout state to survive restarts
Fix
Fixed in commit `2749bc0` on branch `releases/1.4.x` — added abstract RateLimitBackend with InMemoryBackend and DatabaseBackend implementations; defaults to DatabaseBackend when DB available.
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-h45m-mgcp-q388https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916dehttps://github.com/jahlives/openssl_encryptLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
