# GHSA-HM8G-XG6V-JJG9: Summary \_redis\_request\_count in guard\_core/handlers/ratelimit\_handler.py caught every Redis error (including GuardRedisError from a failed connection), logged it, and returned no count, so both…

- Database: GitHub
- Severity: CVSS 3.7 (Low)
- Published: 2026-08-27
- Modified: 2026-08-27

## Affected versions

- guard-core (PyPI): through 3.14.0

## Description

### Summary

`_redis_request_count` in `guard_core/handlers/ratelimit_handler.py` caught every Redis error (including `GuardRedisError` from a failed connection), logged it, and returned no count, so both `check_rate_limit` (the HTTP pipeline) and `check_rate_limit_by_ip` (websocket and framework-agnostic callers) fell back to the in-memory per-process window. `redis_fail_open` (default `False`) documents fail-closed behaviour on Redis failure for every check, but the rate limiter never raised.

### Impact

During a Redis outage, or when a Redis-down state is induced, a deployment with N workers enforces N times its configured rate limit per client, and the shared window that bans and auto-ban counters depend on is gone, with only an error log line per request as the signal. An operator who chose `redis_fail_open=False` expecting requests to fail closed during an outage got the weaker limit instead.

### Affected

All guard-core versions up to and including 3.14.0 with `enable_redis=True`.

### Fixed in 3.15.0

Fixed in [guard-core 3.15.0](https://github.com/rennf93/guard-core/releases/tag/3.15.0) ([PyPI](https://pypi.org/project/guard-core/3.15.0/)), merged in [#83](https://github.com/rennf93/guard-core/pull/83) (75d13343). `redis_fail_open=False`: the rate limiter raises `GuardRedisError`; the pipeline applies `fail_secure` (500 under fail-secure, pass-through otherwise) and fastapi-guard's websocket guard closes 1013. `redis_fail_open=True`: the in-memory window is used with one warning per process. Labelled Breaking in the 3.15.0 changelog.

### Credit

Found by the maintainers while verifying the websocket integration for a downstream project.

## References

- https://github.com/Guard-Core/guard-core/security/advisories/GHSA-hm8g-xg6v-jjg9

Page: https://cve.now/GHSA-HM8G-XG6V-JJG9

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
