All vulnerabilities

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
Weakness
Improper input validation (CWE-20)
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…
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
guard-corePyPI · osv:PyPI:guard-core
  • From 1.0.0 before 3.13.0

About guard-core

Weekly downloads (PyPI)
17,249PyPI Stats, 24 Nov 2026

References