{"id":"CVE-2025-46814","published":"2025-05-06T14:55:48Z","modified":"2025-05-06T19:51:34Z","title":"FastAPI Guard Remote Header Injection via X-Forwarded-For Manipulation","vendor":"rennf93","product":"fastapi-guard","tier":"tail","description":{"text":"FastAPI Guard is a security library for FastAPI that provides middleware to control IPs, log requests, and detect penetration attempts. An HTTP header injection vulnerability has been identified in versions prior to 2.0.0. By manipulating the X-Forwarded-For header, an attacker can potentially inject arbitrary IP addresses into the request. This vulnerability can allow attackers to bypass IP-based access controls, mislead logging systems, and impersonate trusted clients. It is especially impactful when the application relies on the X-Forwarded-For header for IP-based authorization or authentication. Users should upgrade to FastAPI Guard version 2.0.0 to receive a fix.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.4,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0054,"percentile":0.38959,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/rennf93/fastapi-guard/security/advisories/GHSA-77q8-qmj7-x7pp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rennf93/fastapi-guard/commit/0b003fda4c678c1b514e95f319aee88113e9bf4b","tags":["x_refsource_MISC"]}],"priority":{"score":10.2,"factors":[{"name":"EPSS percentile","points":7.79},{"name":"CVSS severity","points":2.38}]},"vendorSlug":"rennf93","affectedVersions":[{"vendor":"rennf93","product":"fastapi-guard","versions":["< 2.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-05-06T19:51:09.909542Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"fastapi-guard","vulnerableRanges":["<2.0.0"],"patched":["2.0.0"],"from":["PYSEC-2025-242"],"provenance":"source"}],"summary":{"text":"FastAPI Guard, a security middleware library for FastAPI, contains an HTTP header injection flaw in its handling of the X-Forwarded-For header in versions before 2.0.0. An attacker who can send requests to the application and get a victim to take a user-interaction step can inject arbitrary IP addresses via this header, which can bypass IP-based access controls, mislead logging, and impersonate trusted clients, with the greatest impact where authorization relies on that header.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:24Z"},"euvd":{"id":"EUVD-2025-13598","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rennf93-fastapi-guard-cve-2025-46814","children":[{"from":"CVE-2025-46814","to":"CVE-2025-54365","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["guard/middleware.py","guard/models.py","guard/utils.py"],"commits":["https://github.com/rennf93/fastapi-guard/commit/0b003fda4c678c1b514e95f319aee88113e9bf4b","https://github.com/rennf93/fastapi-guard/commit/d9d50e8130b7b434cdc1b001b8cfd03a06729f7f","https://github.com/rennf93/fastapi-guard/commit/0829292c322d33dc14ab00c5451c5c138148035a"],"basis":"shared function","functions":["SecurityConfig","dispatch","is_ip_allowed"]}]}]}}