{"id":"CVE-2026-129304","kind":"vulnerability","aliases":["CVE-2026-129304"],"related":[],"title":"Guard Core: unvalidated X-Forwarded-For lets clients skew Redis behavior tracking","description":"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.","summary":"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.","severity":"medium","cvss":5.4,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["django","fastapi","flask","guard-core","package","python","redis"],"not_affected_if":["default-config","no-redis","no-trusted-proxies"],"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.\n- 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.\n- Confirm whether behavior tracking uses Redis.","fix":"- guard-core: upgrade to `3.13.0`","status":"open","published_at":"2026-11-16T20:19:01+00:00","first_seen_at":"2026-11-16T20:38:45+00:00","triaged_at":"2026-11-16T20:39:37+00:00","updated_at":"2026-11-16T20:39:37+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-16T20:39:37Z","model":"claude-haiku-5-5","output":{"fix":"- guard-core: upgrade to `3.13.0`","reach":"internet","title":"Guard Core: unvalidated X-Forwarded-For lets clients skew Redis behavior tracking","impact":"low","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["fastapi","flask","django","redis","python","guard-core"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Attacker skews other clients' behavior counts and floods Redis keyspace","analyst_note":"","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.\n- 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.\n- Confirm whether behavior tracking uses Redis.","plain_action":"","product_name":"guard-core","needs_analyst":false,"not_affected_if":["no-trusted-proxies","no-redis","default-config"],"who_is_affected":"Applications that use Guard Core through a FastAPI, Flask or Django adapter, have behavior tracking backed by Redis, and set trusted_proxies so that the client IP comes from X-Forwarded-For. The header must be attacker-controlled for the flaw to matter, so deployments without trusted_proxies or behind a proxy that strips client-sent headers are less exposed. Teams that do not use these adapters can skip it.","user_interaction":"no","product_ecosystem":"pypi","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000841,"input_tokens":4829,"output_tokens":717,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-129304':16A,19A '-2026':15A,18A '1.0.0':111C '3.13.0':113C,228C 'action':90B,215C 'adapt':41B,109C 'address':55B,136C 'also':211C 'api':95C 'arbitrari':152C 'attack':62B,149C 'attacker-control':148C 'ban':89B,214C 'behavior':12A,79B,183C 'behaviortrack':157C 'behind':34B 'block':169C 'caus':176C,217C 'charact':70B 'check':50B 'client':9A,78B,153C,182C 'configur':60B,139C 'control':64B,150C 'core':2A,25B,30B,92C,97C 'core/handlers/behavior_handler.py':160C 'core/utils.py':120C 'count':80B,180C 'creat':195C 'cve':14A,17A 'deploy':138C 'disturb':188C 'django':20B,39B 'djapi':107C 'embed':185C 'engin':33B,98C 'entri':128C,146C 'error':87B,221C 'event':184C 'extract':114C 'fastapi':21B,36B,102C 'fastapi-guard':101C 'fix':225C 'flask':22B,37B 'flaskapi':104C 'flood':81B 'forward':6A,46B,116C,126C 'glob':69B,171C,173C 'guard':1A,24B,29B,40B,91C,103C,105C,108C,119C,159C 'guard-cor':23B 'header':48B,66B,117C 'ident':193C,209C 'inject':68B 'interpol':163C 'ip':54B,135C,154C,208C 'issu':223C 'key':75B,166C,170C,189C,197C 'keyspac':83B,204C 'let':8A 'metacharact':174C 'name':167C 'non':207C 'non-ip':206C 'one':177C 'packag':26B 'pars':190C 'pattern':172C 'proxi':58B,142C 'python':27B 'reach':156C,212C 'redi':11A,28B,74B,165C,203C 'repeat':199C 'request':178C 'return':121C 'rotat':192C 'scan':200C 'secur':32B,96C 'select':123C,145C 'separ':72B,186C 'share':202C 'skew':10A,76B 'string':155C 'track':13A 'trigger':85B 'trust':42B,57B,141C 'unbound':196C 'uncaught':86B,219C 'unvalid':3A 'valid':130C,220C 'version':227C 'without':49B,129C 'x':5A,45B,125C 'x-forwarded-for':4A,44B,124C","nicknames":[],"mitigations":[],"who_affected":"Applications that use Guard Core through a FastAPI, Flask or Django adapter, have behavior tracking backed by Redis, and set trusted_proxies so that the client IP comes from X-Forwarded-For. The header must be attacker-controlled for the flaw to matter, so deployments without trusted_proxies or behind a proxy that strips client-sent headers are less exposed. Teams that do not use these adapters can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["django","fastapi","flask","guardcore","medium","package","python","redis"],"campaign_type":null,"search_a":"'-129304':16A,19A '-2026':15A,18A 'behavior':12A 'client':9A 'core':2A 'cve':14A,17A 'forward':6A 'guard':1A 'let':8A 'redi':11A 'skew':10A 'track':13A 'unvalid':3A 'x':5A 'x-forwarded-for':4A","search_b":"'action':90B 'adapt':41B 'address':55B 'attack':62B 'ban':89B 'behavior':79B 'behind':34B 'charact':70B 'check':50B 'client':78B 'configur':60B 'control':64B 'core':25B,30B 'count':80B 'django':20B,39B 'engin':33B 'error':87B 'fastapi':21B,36B 'flask':22B,37B 'flood':81B 'forward':46B 'glob':69B 'guard':24B,29B,40B 'guard-cor':23B 'header':48B,66B 'inject':68B 'ip':54B 'key':75B 'keyspac':83B 'packag':26B 'proxi':58B 'python':27B 'redi':28B,74B 'secur':32B 'separ':72B 'skew':76B 'trigger':85B 'trust':42B,57B 'uncaught':86B 'without':49B 'x':45B 'x-forwarded-for':44B","search_c":"'1.0.0':111C '3.13.0':113C,228C 'action':215C 'adapt':109C 'address':136C 'also':211C 'api':95C 'arbitrari':152C 'attack':149C 'attacker-control':148C 'ban':214C 'behavior':183C 'behaviortrack':157C 'block':169C 'caus':176C,217C 'client':153C,182C 'configur':139C 'control':150C 'core':92C,97C 'core/handlers/behavior_handler.py':160C 'core/utils.py':120C 'count':180C 'creat':195C 'deploy':138C 'disturb':188C 'djapi':107C 'embed':185C 'engin':98C 'entri':128C,146C 'error':221C 'event':184C 'extract':114C 'fastapi':102C 'fastapi-guard':101C 'fix':225C 'flaskapi':104C 'forward':116C,126C 'glob':171C,173C 'guard':91C,103C,105C,108C,119C,159C 'header':117C 'ident':193C,209C 'interpol':163C 'ip':135C,154C,208C 'issu':223C 'key':166C,170C,189C,197C 'keyspac':204C 'metacharact':174C 'name':167C 'non':207C 'non-ip':206C 'one':177C 'pars':190C 'pattern':172C 'proxi':142C 'reach':156C,212C 'redi':165C,203C 'repeat':199C 'request':178C 'return':121C 'rotat':192C 'scan':200C 'secur':96C 'select':123C,145C 'separ':186C 'share':202C 'string':155C 'trust':141C 'unbound':196C 'uncaught':219C 'valid':130C,220C 'version':227C 'without':129C 'x':125C 'x-forwarded-for':124C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-08-25T04:09:08+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-129304","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129304","severity":null,"published_at":"2026-11-16T20:19:01+00:00","modified_at":"2026-11-16T20:19:01+00:00","first_seen_at":"2026-11-16T20:38:45+00:00","fetched_at":"2026-11-16T20:38:45+00:00","note":null}],"documents":[{"id":172270,"url":"https://github.com/Guard-Core/guard-core/commit/c07239fa1c5aa93e3f179440e79dad652977d3e4","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":172271,"url":"https://github.com/Guard-Core/guard-core/releases/tag/3.13.0","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":172278,"url":"https://github.com/Guard-Core/guard-core/security/advisories/GHSA-gm9r-hvc9-96gv","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-08-25T04:09:08+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}