{"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-53539 exists.","fix":"Upgrade fastapi-guard to 3.0.1 or later.","what":"CVE-2025-53539 is a medium-severity denial of service vulnerability in rennf93 fastapi-guard, published on 7 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-53539 and fix it if it is affected.\n\nWhat it is: CVE-2025-53539 is a medium-severity denial of service vulnerability in rennf93 fastapi-guard, published on 7 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-53539 exists.\n\nAffected packages and fixed versions:\n- fastapi-guard (PyPI): affected all versions; fixed in 3.0.1\n- fastapi-guard (PyPI): affected all versions; fixed in 3.0.1\n- fastapi-guard (PyPI): affected all versions; fixed in 3.0.1\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-53539/ (Markdown: https://insights.sbomify.com/CVE-2025-53539/index.md)","id":"CVE-2025-53539","markdown":"https://insights.sbomify.com/CVE-2025-53539/index.md","name":"CVE-2025-53539","record":{"aliases":["GHSA-j47q-rc62-w448","PYSEC-2026-1359"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"FastAPI security library","requires_auth":"none","summary":"Attackers can cause denial of service in FastAPI Guard by sending crafted inputs that trigger inefficient regex backtracking in penetration detection.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fastapi_guard","vendor":"fastapi-guard"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"description":"FastAPI Guard is a security library for FastAPI that provides middleware to control IPs, log requests, and detect penetration attempts. fastapi-guard's penetration attempts detection uses regex to scan incoming requests. However, some of the regex patterns used in detection are extremely inefficient and can cause polynomial complexity backtracks when handling specially crafted inputs. This vulnerability is fixed in 3.0.1.","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":"ReDoS in fastapi-guard's penetration attempts detector","id":"CVE-2025-53539","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"CSRF Vulnerability in Firmware Update Endpoints Allows Remote Code Execution","id":"CVE-2025-53540"},"packages":[{"ecosystem":"PyPI","fixed":["3.0.1"],"introduced":["0"],"last_affected":[],"package":"fastapi-guard","purl":null,"source":"GHSA-j47q-rc62-w448"},{"ecosystem":"PyPI","fixed":["3.0.1"],"introduced":["0"],"last_affected":[],"package":"fastapi-guard","purl":"pkg:pypi/fastapi-guard","source":"GHSA-j47q-rc62-w448"},{"ecosystem":"PyPI","fixed":["3.0.1"],"introduced":["0"],"last_affected":[],"package":"fastapi-guard","purl":"pkg:pypi/fastapi-guard","source":"PYSEC-2026-1359"}],"prev":{"headline":"Suricata's mishandling of data on HTTP2 stream 0 can lead to resource starvation","id":"CVE-2025-53538"},"products":["fastapi-guard"],"published":"2025-07-07","related":[{"cvss_score":7.8,"headline":"fastapi-guard patch contains bypassable RegEx","id":"CVE-2025-54365","kev_date_added":null,"published":"2025-07-23"},{"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":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-07-07","vendors":["rennf93"]},"summary":"Attackers can cause denial of service in FastAPI Guard by sending crafted inputs that trigger inefficient regex backtracking in penetration detection.","url":"https://insights.sbomify.com/CVE-2025-53539/"}