PyPI
CVE-2026-129304
Guard Core: Unvalidated X-Forwarded-For-derived string used as a Redis key component and interpolated into a KEYS glob pattern
- Severity
- Medium 5.4
- Published
- 19 Nov 2026
- Last changed
- 19 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.13.0
- Exploit chance
- 0.4% in the next 30 daysHigher than 31% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data · Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L- Also known as
- GHSA-gm9r-hvc9-96gv
- Sources
- OSV.dev and GitHub
Description
_extract_from_forwarded_header() (guard_core/utils.py:172-181 in 3.12.0; :179 on master 08780f1) returns the selected X-Forwarded-For entry without any ipaddress validation. When that entry is attacker-controlled, an arbitrary string becomes client_ip and flows into BehaviorTracker (guard_core/handlers/behavior_handler.py:83-102), which interpolates it verbatim into both a Redis key name and a KEYS glob pattern:
Same shape in track_return_pattern() (behavior_handler.py:135-142). redis_handler.keys() maps to the blocking Redis KEYS command (guard_core/handlers/redis_handler.py:265-275).
Three consequences, in increasing severity:
- Cross-client counter contamination. X-Forwarded-For: * makes the glob match every client's behavior-usage keys for the endpoint. Verified with a fake-Redis harness: a client 9.9.9.9 hit an endpoint 3 times (threshold=3 rule), then a single attacker request carrying XFF: issued the pattern behavior_usage:behavior:usage:app.login::*, counted the victim's…
Affected software
| Software | Affected versions |
|---|---|
guard-corePyPI · osv:PyPI:guard-core |
|
About guard-core
- Weekly downloads (PyPI)
- 17,249PyPI Stats, 24 Nov 2026
Vulnerabilities in guard-core
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-129303Guard Core: Whitespace-collapse preprocessing permanently disables the CRLF-anchored http-splitting and command-injection detectors in the default detection modeLow 3.7 19 Nov 2026
- CVE-2026-129302Guard Core: Quadratic ReDoS in built-in detection pattern freezes the event loop with a single requestHigh 7.5 19 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-129304
- GitHub Advisory Database https://github.com/advisories/GHSA-gm9r-hvc9-96gv