{"answers":{"affected":"3 open source packages ship an affected version, including fastapi-guard. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54365 exists.","fix":"Upgrade fastapi-guard to 3.0.2 or later.","what":"CVE-2025-54365 is a high-severity vulnerability in rennf93 fastapi-guard, published on 23 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-54365 and fix it if it is affected.\n\nWhat it is: CVE-2025-54365 is a high-severity vulnerability in rennf93 fastapi-guard, published on 23 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54365 exists.\n\nAffected packages and fixed versions:\n- fastapi-guard (PyPI): affected from 3.0.1; fixed in 3.0.2\n- fastapi-guard (PyPI): affected from 3.0.1; fixed in 3.0.2\n- fastapi-guard (PyPI): affected from 3.0.1; fixed in 3.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-54365/ (Markdown: https://insights.sbomify.com/CVE-2025-54365/index.md)","id":"CVE-2025-54365","markdown":"https://insights.sbomify.com/CVE-2025-54365/index.md","name":"CVE-2025-54365","record":{"aliases":["GHSA-rrf6-pxg8-684g","PYSEC-2026-1360"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Python security library","requires_auth":"none","summary":"Attackers can bypass IP and penetration detection filters in fastapi-guard by using long strings, allowing unauthorized access or malicious requests to proceed.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fastapi_guard","vendor":"fastapi-guard"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:P","version":"4.0"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"},{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-185","name":"Incorrect Regular Expression"}],"description":"fastapi-guard is a security library for FastAPI that provides middleware to control IPs, log requests, detect penetration attempts and more. In version 3.0.1, the regular expression patched to mitigate the ReDoS vulnerability by limiting the length of string fails to catch inputs that exceed this limit. This type of patch fails to detect cases in which the string representing the attributes of a \u003cscript\u003e tag exceeds 100 characters. As a result, most of the regex patterns present in version 3.0.1 can be bypassed. This is fixed in version 3.0.2.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"fastapi-guard patch contains bypassable RegEx","id":"CVE-2025-54365","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"other","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"FreeScout's deserialization of untrusted data leads to Remote Code Execution","id":"CVE-2025-54366"},"packages":[{"ecosystem":"PyPI","fixed":["3.0.2"],"introduced":["3.0.1"],"last_affected":[],"package":"fastapi-guard","purl":null,"source":"GHSA-rrf6-pxg8-684g"},{"ecosystem":"PyPI","fixed":["3.0.2"],"introduced":["3.0.1"],"last_affected":[],"package":"fastapi-guard","purl":"pkg:pypi/fastapi-guard","source":"GHSA-rrf6-pxg8-684g"},{"ecosystem":"PyPI","fixed":["3.0.2"],"introduced":["3.0.1"],"last_affected":[],"package":"fastapi-guard","purl":"pkg:pypi/fastapi-guard","source":"PYSEC-2026-1360"}],"prev":{"headline":"Denial of service in Knack","id":"CVE-2025-54364"},"products":["fastapi-guard"],"published":"2025-07-23","related":[{"cvss_score":6.9,"headline":"ReDoS in fastapi-guard's penetration attempts detector","id":"CVE-2025-53539","kev_date_added":null,"published":"2025-07-07"},{"cvss_score":3.4,"headline":"FastAPI Guard Remote Header Injection via X-Forwarded-For Manipulation","id":"CVE-2025-46814","kev_date_added":null,"published":"2025-05-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-07-24","vendors":["rennf93"]},"summary":"Attackers can bypass IP and penetration detection filters in fastapi-guard by using long strings, allowing unauthorized access or malicious requests to proceed.","url":"https://insights.sbomify.com/CVE-2025-54365/"}