Skip to content

CVE-2026-129302 Guard Core: Quadratic ReDoS in built-in detection pattern freezes the event loop with a single request

HighCVSS 7.5 EPSS 0.35%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial

Description

Guard Core is an API security core engine for the FastAPI-Guard, FlaskAPI Guard, and DjAPI Guard adapters. From 3.5.0 until 3.13.0, built-in penetration-detection patterns in guard_core/handlers/suspatterns_handler.py execute through a direct pattern.search(content) call instead of the timeout-protected create_safe_matcher() path used for custom patterns. The built-in template-injection detector contains an unbounded expression with quadratic behavior when scanning repeated opening braces. Because penetration detection and enhanced mode are enabled by a stock SecurityConfig, an unauthenticated request can block the shared asyncio event loop, affecting all application endpoints. The triggering input does not produce a detection match, so the request can complete without incrementing ban counters or being recorded as suspicious. This issue is fixed in version 3.13.0.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
pypi guard-core(PyPI) = 3.5.0; = 3.6.0; = 3.7.0; = 3.7.1 +8 more 3.13.0 Fixed
rennf93 guard-core = >= 3.5.0, < 3.13.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
rennf93 guard-core = >= 3.5.0, < 3.13.0 No fix listed
pypi guard-core(PyPI) >= 3.5.0, <= 3.12.0 No fix listed
pypi guard-core(PyPI) >= 3.5.0, < 3.13.0 3.13.0
pypi guard-core(PyPI) = 3.10.0 No fix listed
pypi guard-core(PyPI) = 3.11.0 No fix listed
pypi guard-core(PyPI) = 3.12.0 No fix listed
pypi guard-core(PyPI) = 3.5.0 No fix listed
pypi guard-core(PyPI) = 3.6.0 No fix listed
pypi guard-core(PyPI) = 3.7.0 No fix listed
pypi guard-core(PyPI) = 3.7.1 No fix listed
pypi guard-core(PyPI) = 3.8.0 No fix listed
pypi guard-core(PyPI) = 3.8.1 No fix listed
pypi guard-core(PyPI) = 3.9.0 No fix listed

References