{"id":"CVE-2026-74878","aliases":["CVE-2026-74878","GHSA-h45m-mgcp-q388","PYSEC-2026-3757"],"related":[],"kind":"vulnerability","state":"published","title":"openssl_encrypt before 1.4.0 TOTP Rate Limiter Bypass","summary":"openssl_encrypt versions before 1.4.0 use an in-memory rate limiter for TOTP brute-force protection that is not shared across workers and is lost on server restart. Attackers can distribute authentication attempts across multiple server instances or retry immediately after a restart to bypass rate limiting protections.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"openssl_encrypt versions before 1.4.0 use an in-memory rate limiter for TOTP brute-force protection that is not shared across workers and is lost on server restart. Attackers can distribute authentication attempts across multiple server instances or retry immediately after a restart to bypass rate limiting protections.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"}],"published":"2026-03-31T23:41:26.000Z","modified":"2026-10-08T16:17:39.723Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.4.0","status":"affected"},{"type":"semver","version":"1.4.0","status":"unaffected"}],"vendor":"jahlives","product":"openssl_encrypt","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.4.0"}],"ecosystem":"PyPI","package":"openssl-encrypt","purl":"pkg:pypi/openssl-encrypt","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.4.0"}],"vendor":"jahlives","product":"openssl_encrypt","cpe":"cpe:2.3:a:jahlives:openssl_encrypt:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.4.0"}],"ecosystem":"PyPI","package":"openssl-encrypt","purl":"pkg:pypi/openssl-encrypt","source":"pysec"}],"references":[{"url":"https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-h45m-mgcp-q388","tags":["advisory","mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/openssl-encrypt-before-totp-rate-limiter-bypass","tags":["advisory","third-party-advisory"],"sources":["cvelist","nvd","pysec"]},{"url":"https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916de","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jahlives/openssl_encrypt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-08-17T14:33:16.067Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-74878","url":"https://www.cve.org/CVERecord?id=CVE-2026-74878","licence":"CVE Terms of Use","modified":"2026-10-08T15:24:51.279Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h45m-mgcp-q388","url":"https://github.com/advisories/GHSA-h45m-mgcp-q388","licence":"CC-BY-4.0","modified":"2026-09-02T09:10:36.272Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-74878","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74878","licence":"Public domain","modified":"2026-10-08T16:17:39.723Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-3757","url":"https://osv.dev/vulnerability/PYSEC-2026-3757","licence":"CC-BY-4.0","modified":"2026-09-02T09:00:04.173Z"}],"updatedAt":"2026-11-25T22:59:33.333Z","epss":{"score":0.00398,"percentile":0.36181,"date":"2026-12-01T12:00:22.000Z"}}