Critical

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

  • Disclosed: 31.03.2026
  • Updated: 11.10.2026 15:17

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) openssl-encrypt < 1.4.0 1.4.0

References

CVSS score -
CVSS 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
Weakness (CWE)
CWE-770
Platform
Python (PyPI)
Package
openssl-encrypt
Disclosed
31.03.2026
Updated
11.10.2026 15:17

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-3757 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-h45m-mgcp-q388 - CC BY 4.0

Vulnerability history: openssl-encrypt

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (60) in the archive
Total entries
60
First → latest
03.2026 08.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 1
  • Medium 15
  • Unrated 42

Disclosures per year

  1. 2026: 60
Severity:
  1. openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart this entry
    Critical CVE-2026-74878 < 1.4.0 1.4.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.