Guard Core
Monthly
Guard-core 3.5.0 through 3.12.0 lets a single unauthenticated request freeze every endpoint of an application that embeds it, because the built-in template-injection detection regex is executed through a bare inline pattern.search() on the asyncio event loop instead of the timeout-protected create_safe_matcher() path that has been reserved for custom patterns since 3.5.0. The expression's unbounded [^\}]+ gap goes quadratic on a run of repeated opening braces, so a 10,000-character scanned value costs roughly 1.85 seconds of loop time and a 256 KB JSON body carrying about 25 such string fields measured 44 seconds of continuous blockage from one request, which the reporter notes can be repeated at the stock limit of 10 requests per 60 seconds to hold the loop saturated indefinitely. Critically, the payload produces no detection match, so no ban counter increments and nothing is recorded as suspicious, and since the loop is shared with the host application (fastapi-guard, flaskapi-guard async deployments, djapi-guard ASGI), the freeze affects all endpoints rather than just guarded routes; a public proof-of-concept script with measured timings accompanies the advisory, it is not independently verified as working exploit code, and no active exploitation is confirmed (not in CISA KEV), with the vulnerability prioritized for remediation this week.
Whitespace-collapse preprocessing in Guard Core 1.0.0 through 3.12.0 runs before pattern matching in the default enhanced detection mode, structurally disabling the CRLF-anchored http_split and newline-anchored cmd_injection detectors so framework-decoded CRLF payloads pass the API security layer unflagged. Any deployment of the FastAPI-Guard, FlaskAPI Guard or DjAPI Guard adapters using a stock SecurityConfig is affected, while legacy mode (no SecurityConfig detection attributes) skips preprocessing and still catches the same payload. Impact is a detection bypass in a defense-in-depth layer rather than direct code execution: the advisory states it is not exploitable against Starlette/uvicorn-backed apps, which reject CRLF in response headers, and a public proof-of-concept included in the advisory reproduces the missed CRLF payload alongside SQLi controls that are still blocked.
Improper input validation in Guard Core (the shared API-security engine behind FastAPI-Guard, FlaskAPI Guard and DjAPI Guard) allows a crafted X-Forwarded-For entry to be accepted as a client IP string in versions 1.0.0 through 3.12.0. The flaw is only reachable in non-default deployments where trusted_proxies is populated and the attacker controls the XFF entry that _extract_from_forwarded_header() selects, and where the Redis-backed BehaviorTracker is enabled; in that configuration the arbitrary string is interpolated into Redis key names and KEYS glob patterns, enabling cross-client counter contamination, key-parsing confusion, unbounded key growth with blocking keyspace scans, and an uncaught ValueError on the ban path. No CISA KEV listing is recorded and no verified working exploit is known, though the upstream advisory publishes a PoC reference demonstrating that the unvalidated value is returned verbatim; the CVSS 3.1 score is 5.4 (AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L).
Guard-core 3.5.0 through 3.12.0 lets a single unauthenticated request freeze every endpoint of an application that embeds it, because the built-in template-injection detection regex is executed through a bare inline pattern.search() on the asyncio event loop instead of the timeout-protected create_safe_matcher() path that has been reserved for custom patterns since 3.5.0. The expression's unbounded [^\}]+ gap goes quadratic on a run of repeated opening braces, so a 10,000-character scanned value costs roughly 1.85 seconds of loop time and a 256 KB JSON body carrying about 25 such string fields measured 44 seconds of continuous blockage from one request, which the reporter notes can be repeated at the stock limit of 10 requests per 60 seconds to hold the loop saturated indefinitely. Critically, the payload produces no detection match, so no ban counter increments and nothing is recorded as suspicious, and since the loop is shared with the host application (fastapi-guard, flaskapi-guard async deployments, djapi-guard ASGI), the freeze affects all endpoints rather than just guarded routes; a public proof-of-concept script with measured timings accompanies the advisory, it is not independently verified as working exploit code, and no active exploitation is confirmed (not in CISA KEV), with the vulnerability prioritized for remediation this week.
Whitespace-collapse preprocessing in Guard Core 1.0.0 through 3.12.0 runs before pattern matching in the default enhanced detection mode, structurally disabling the CRLF-anchored http_split and newline-anchored cmd_injection detectors so framework-decoded CRLF payloads pass the API security layer unflagged. Any deployment of the FastAPI-Guard, FlaskAPI Guard or DjAPI Guard adapters using a stock SecurityConfig is affected, while legacy mode (no SecurityConfig detection attributes) skips preprocessing and still catches the same payload. Impact is a detection bypass in a defense-in-depth layer rather than direct code execution: the advisory states it is not exploitable against Starlette/uvicorn-backed apps, which reject CRLF in response headers, and a public proof-of-concept included in the advisory reproduces the missed CRLF payload alongside SQLi controls that are still blocked.
Improper input validation in Guard Core (the shared API-security engine behind FastAPI-Guard, FlaskAPI Guard and DjAPI Guard) allows a crafted X-Forwarded-For entry to be accepted as a client IP string in versions 1.0.0 through 3.12.0. The flaw is only reachable in non-default deployments where trusted_proxies is populated and the attacker controls the XFF entry that _extract_from_forwarded_header() selects, and where the Redis-backed BehaviorTracker is enabled; in that configuration the arbitrary string is interpolated into Redis key names and KEYS glob patterns, enabling cross-client counter contamination, key-parsing confusion, unbounded key growth with blocking keyspace scans, and an uncaught ValueError on the ban path. No CISA KEV listing is recorded and no verified working exploit is known, though the upstream advisory publishes a PoC reference demonstrating that the unvalidated value is returned verbatim; the CVSS 3.1 score is 5.4 (AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L).