openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-770.
Summary
## 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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | openssl-encrypt (PyPI) | before 1.4.0 | 1.4.0 | Patch available | GHSA-h45m-mgcp-q388 |
- openssl-encrypt (PyPI) Vendor— Affected before 1.4.0 Fixed in 1.4.0 Patch available GHSA-h45m-mgcp-q388
Remediation
- Fix · GHSA-h45m-mgcp-q388 openssl-encrypt (PyPI) Fixed in 1.4.0 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-h45m-mgcp-q388
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences