---
title: "GHSA-h45m-mgcp-q388: openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart"
url: https://erroneo.us/security/ghsa/GHSA-h45m-mgcp-q388/
description: "GHSA-h45m-mgcp-q388 (critical, PyPI): openssl-encrypt: TOTP rate limiter is in-memory only — not shared across workers, lost on restart. Severity: HIGH…"
type: advisory
section: "Security Digest"
date_published: 2026-03-31
date_modified: 2026-03-31
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-h45m-mgcp-q388"
license: All rights reserved. Quote with attribution and a link.
---

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

## Affected packages

- PyPI `openssl-encrypt` < 1.4.0 → fixed: 1.4.0

## Details

Severity: HIGH Summary The TOTP brute-force rate limiter in opensslencryptserver/modules/pepper/totp.py at lines 47-98 uses an in-memory defaultdict(list) as a class variable. Affected Code 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.

## Sources

- [GitHub Advisory GHSA-h45m-mgcp-q388](https://github.com/advisories/GHSA-h45m-mgcp-q388)
- [github.com](https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-h45m-mgcp-q388)
- [github.com](https://github.com/jahlives/openssl_encrypt/commit/2749bc0949b34a5921a35fb4a3f1856fc51916de)

---
Source page: https://erroneo.us/security/ghsa/GHSA-h45m-mgcp-q388/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
