Rennf93 guard-core
Guard Core: Quadratic ReDoS in built-in detection pattern freezes the event loop with a single request
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3.5.0, < 3.13.0
Fixed in 3.13.0
Mitigation
Upgrade guard-core to 3.13.0 or later.
References
- Vendor advisory github.com/Guard-Core/guard-core/security/advi…
- Patch github.com/Guard-Core/guard-core/pull/68
- Patch github.com/Guard-Core/guard-core/commit/c07239…
1 more
- Release notes github.com/Guard-Core/guard-core/releases/tag/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.