Vulnerabilidades / GHSA-h45m-mgcp-q388

crítica

GHSA-h45m-mgcp-q388

openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart

Publicada Modificada
En la Trivy database desde, como mínimo, el 24 oct 2026, 07:11 UTCNo consta cuándo entró antes de ese build.

Severidad por fuente

GHSA9.1CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

La etiqueta propia de Trivy es CRITICAL. Crítica según GHSA.

Descripción

## 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 ```python 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 only ``` ### Impact 1. Rate limit state is **not shared** across multiple server instances/workers — an attacker can distribute attempts 2. All rate limit state is **lost on server restart** — allows immediate retry 3. 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.

Paquetes afectados y versiones corregidas

FuentePaqueteCorregido en
pip::GitHub Security Advisory pipopenssl-encrypt1.4.0

Referencias

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.