---
id: "CVE-2026-129304"
page: "https://infrastack.ai/live/CVE-2026-129304"
kind: "vulnerability"
aliases: ["CVE-2026-129304"]
title: "Guard Core: unvalidated X-Forwarded-For lets clients skew Redis behavior tracking"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["django", "fastapi", "flask", "guard-core", "package", "python", "redis"]
not_affected_if: ["default-config", "no-redis", "no-trusted-proxies"]
published_at: "2026-11-16T20:19:01+00:00"
first_seen_at: "2026-11-16T20:38:45+00:00"
updated_at: "2026-11-16T20:39:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129304", "first_seen_at": "2026-11-16T20:38:45+00:00"}]
exploit_sources: []
---

# Guard Core: unvalidated X-Forwarded-For lets clients skew Redis behavior tracking

Link for people: https://infrastack.ai/live/CVE-2026-129304 (this .md is for agents)

Guard Core, the security engine behind the FastAPI, Flask and Django Guard adapters, trusts the X-Forwarded-For header without checking it is an IP address when trusted_proxies is configured. An attacker who controls that header can inject glob characters and separators into Redis keys, skewing other clients' behavior counts, flooding the keyspace, and triggering uncaught errors on ban actions.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version of `guard-core` (for example `pip show guard-core`); versions from 1.0.0 up to but not including 3.13.0 are affected.
- Look for `trusted_proxies` in the Guard configuration and check whether the proxy in front of the app overwrites or appends to X-Forwarded-For.
- Confirm whether behavior tracking uses Redis.

## Fix

- guard-core: upgrade to `3.13.0`

## Timeline

- 2026-11-16T20:38:45+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-129304

## Documents

- [advisory] Vendor advisory: github.com https://github.com/Guard-Core/guard-core/security/advisories/GHSA-gm9r-hvc9-96gv
- [fix] Patch: github.com https://github.com/Guard-Core/guard-core/commit/c07239fa1c5aa93e3f179440e79dad652977d3e4
- [fix] Release notes: github.com https://github.com/Guard-Core/guard-core/releases/tag/3.13.0

## From the sources

Guard Core is an API security core engine for the FastAPI-Guard, FlaskAPI Guard, and DjAPI Guard adapters. From 1.0.0 until 3.13.0, _extract_from_forwarded_header() in guard_core/utils.py returns the selected X-Forwarded-For entry without validating that it is an IP address. In deployments configured with trusted_proxies where the selected entry is attacker-controlled, the arbitrary client_ip string reaches BehaviorTracker in guard_core/handlers/behavior_handler.py and is interpolated into Redis key names and blocking KEYS glob patterns. Glob metacharacters can cause one request to count other clients' behavior events, embedded separators can disturb key parsing, and rotating identities can create unbounded keys while repeatedly scanning the shared Redis keyspace. A non-IP identity can also reach a ban action and cause an uncaught validation error. This issue is fixed in version 3.13.0.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
