## Guard Core: Unvalidated X-Forwarded-For-derived string used as a Redis key component and interpolated into a KEYS glob pattern

- 種別: advisory
- 重大度: medium
- 関連技術: python, redis
- CVE: CVE-2026-129304
- 公開日時: 2026-11-19T22:50:33.000Z
- 情報源: GitHub Advisory Database (https://github.com/advisories/GHSA-gm9r-hvc9-96gv)
- パーマリンク: https://vulnpulse.app/items/ghsa-ghsa-gm9r-hvc9-96gv

影響: pip:guard-core >= 1.0.0, < 3.13.0 → 3.13.0
_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: python key = f"behavior:usage:{endpoint_id}:{client_ip}" await self.redis_handler.s…