Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-h45m-mgcp-q388

CriticalCVSS 9.1 / 10
Published Mar 31, 2026·Last modified Mar 31, 2026
Affected Components(0)

No affected components available

Description

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

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.

Risk Scores
Base Score
9.1

The vulnerability can be exploited over the network without needing physical access. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability.

Threat Intelligence
6.9

Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.

EPSS
N/A

Probability that this vulnerability will be exploited in the wild within the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard