GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GHSA-H45M-MGCP-Q388

Vulnerability from github – Published: 2026-03-31 23:41 – Updated: 2026-03-31 23:41
VLAI
Summary
openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart
Details

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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "openssl-encrypt"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.4.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-770"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-31T23:41:26Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "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 \u2014 an attacker can distribute attempts\n2. All rate limit state is **lost on server restart** \u2014 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` \u2014 added abstract RateLimitBackend with InMemoryBackend and DatabaseBackend implementations; defaults to DatabaseBackend when DB available.",
  "id": "GHSA-h45m-mgcp-q388",
  "modified": "2026-03-31T23:41:26Z",
  "published": "2026-03-31T23:41:26Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-h45m-mgcp-q388"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916de"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/jahlives/openssl_encrypt"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "openssl-encrypt: TOTP rate limiter is in-memory only \u2014 not shared across workers, lost on restart"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…