{"id":"CVE-2026-74878","aliases":["GHSA-h45m-mgcp-q388","PYSEC-2026-3757"],"url":"https://o3.security/vulnerability/CVE-2026-74878","summary":"openssl_encrypt before 1.4.0 TOTP Rate Limiter Bypass","details":"## Severity: HIGH\n\n### Summary\n\nThe 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.\n\n### Affected Code\n\n```python\nclass TOTPRateLimiter:\n    def __init__(self, ...):\n        self.attempts: Dict[str, List[datetime]] = defaultdict(list)\n        self.lockouts: Dict[str, datetime] = {}\n\nclass TOTPService:\n    _rate_limiter = TOTPRateLimiter()  # Class variable, in-memory only\n```\n\n### Impact\n\n1. Rate limit state is **not shared** across multiple server instances/workers — an attacker can distribute attempts\n2. All rate limit state is **lost on server restart** — allows immediate retry\n3. In multi-worker deployments, each worker has independent rate limit state\n\n### Recommended Fix\n\n- Use Redis or the database for rate limit state storage\n- Or use a shared-memory approach for multi-worker deployments\n- At minimum, persist lockout state to survive restarts\n\n### Fix\n\nFixed in commit `2749bc0` on branch `releases/1.4.x` — added abstract RateLimitBackend with InMemoryBackend and DatabaseBackend implementations; defaults to DatabaseBackend when DB available.","published":"2026-08-17T11:04:45.805Z","modified":"2026-10-20T12:02:21.448092461Z","cvss":null,"epss":{"score":0.00372,"percentile":0.29939,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"openssl-encrypt","fixedVersion":"1.4.0"}],"fix":{"url":"https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916de","label":"jahlives/openssl_encrypt@2749bc0"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74878.json"},{"type":"ADVISORY","url":"https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-h45m-mgcp-q388"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74878"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/openssl-encrypt-before-totp-rate-limiter-bypass"},{"type":"WEB","url":"https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916de"},{"type":"PACKAGE","url":"https://github.com/jahlives/openssl_encrypt"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-20T12:02:21.448092461Z"}}