CVE-2026-129304: CVE-2026-129304: Improper Input Validation and Redis Glob Injection in Guard Core
CVE-2026-129304: Improper Input Validation and Redis Glob Injection in Guard Core Vulnerability ID: CVE-2026-129304 CVSS Score: 5.4 Published: 2026-11-19 CVE-2026-129304 is an improper input validation and Redis glo
CVE-2026-129304: Improper Input Validation and Redis Glob Injection in Guard Core
Vulnerability ID: CVE-2026-129304
CVSS Score: 5.4
Published: 2026-11-19
CVE-2026-129304 is an improper input validation and Redis glob pattern injection vulnerability in Guard Core versions 1.0.0 through 3.12.0. The header parsing routine _extract_from_forwarded_header() extracts values from the X-Forwarded-For HTTP header without verifying that the extracted substring is a valid IPv4 or IPv6 address. In deployments configured with trusted_proxies where the target header index is client-controllable, arbitrary strings containing Redis glob metacharacters reach BehaviorTracker and are interpolated directly into Redis key names and blocking KEYS queries. This allows unauthenticated attackers to aggregate cross-client behavioral metrics, trigger false-positive rate limits, cause denial of service via O(N) Redis keyspace scans, or raise unhandled ValueError exceptions during automated IP ban operations.
TL;DR
Guard Core versions prior to 3.13.0 fail to validate IP addresses extracted from X-Forwarded-For headers before interpolating them into Redis KEYS glob queries. Attackers behind configured trusted proxies can inject glob metacharacters to corrupt cross-client behavioral tracking, starve Redis event loops, or crash request handlers.
⚠️ Exploit Status: POC
Technical Details
- CVE ID: CVE-2026-129304 (GHSA-gm9r-hvc9-96gv)
- Weakness Class: CWE-20 (Improper Input Validation) / CWE-943 (Redis Glob Injection)
- CVSS v3.1 Score: 5.4 Medium (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L)
- EPSS Score: 0.244% (15.81st Percentile)
- Attack Vector: Network (Unauthenticated HTTP X-Forwarded-For Header Manipulation)
- Affected Versions: guard-core >= 1.0.0, < 3.13.0
- Patched Version: guard-core 3.13.0
- CISA KEV Status: Not Listed
Affected Systems
- guard-core
- FastAPI-Guard
- FlaskAPI Guard
- DjAPI Guard
-
guard-core: >= 1.0.0, < 3.13.0 (Fixed in:
3.13.0)
Code Analysis
Commit: c07239f
Validate X-Forwarded-For IP addresses, reject glob metacharacters, hash dynamic Redis key segments with SHA-256, and replace blocking KEYS scans with ZSET sliding windows.
Commit: 5031079
Release commit and associated hardening for Guard Core 3.13.0.
Mitigation Strategies
- Upgrade guard-core to version 3.13.0 or later to enable strict IP validation, SHA-256 identity hashing, and ZSET-based sliding window tracking.
- Configure edge reverse proxies and load balancers to overwrite or strip untrusted client-supplied X-Forwarded-For headers at the perimeter.
- Verify that trusted_proxy_depth aligns accurately with the physical proxy architecture so client-controlled header positions cannot be selected.
- Deploy WAF or ingress filter rules to block requests containing glob metacharacters (*, ?, [, ], ) in X-Forwarded-For headers.
Remediation Steps:
- Audit application dependencies (requirements.txt, pyproject.toml, uv.lock, or poetry.lock) to identify guard-core versions >= 1.0.0 and < 3.13.0.
- Run
pip install --upgrade 'guard-core>=3.13.0'oruv add 'guard-core>=3.13.0'in all affected environments. - Verify proxy settings in SecurityConfig (
trusted_proxiesandtrusted_proxy_depth) to confirm accurate client IP resolution. - Flush or allow TTL expiration of legacy
behavior_usage:*andbehavior_pattern:*keys in Redis after deploying 3.13.0.
References
- GitHub Security Advisory GHSA-gm9r-hvc9-96gv
- NVD - CVE-2026-129304 Detail
- CVE.org Record - CVE-2026-129304
- Guard Core Pull Request #68
- Fix Commit c07239fa1c5aa93e3f179440e79dad652977d3e4
- Guard Core Commit 5031079fda93206de0c8f1b45082722c05feb042
- Guard Core Release 3.13.0
- CVE List V5 Record - CVE-2026-129304
- Shodan CVEDB - CVE-2026-129304
Read the full report for CVE-2026-129304 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.