CVE-2026-129302

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

Published Nov 16, 2026 CVSS 3.1 · 7.5 High EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Guard Core, the API security core engine used by FastAPI‑Guard, FlaskAPI Guard, and DjAPI Guard adapters, contains a quadratic ReDoS flaw in its built‑in penetration detection pattern. The flaw arises because the pattern.search call is performed without a timeout limiter, causing excessive computation when scanning strings with many opening braces. An attacker can trigger this issue with a single unauthenticated request that does not even match the detector, leading the shared asyncio event loop to freeze and block all application endpoints. The result is a denial‑of‑service condition where legitimate traffic is unable to reach the API handlers.

Affected Systems

The affected product is Guard Core, specifically versions from 3.5.0 up to 3.12.x. This vulnerability is present in the guard_core/handlers/suspatterns_handler.py module, which is used by the FastAPI‑Guard, FlaskAPI Guard, and DjAPI Guard adapters that rely on SecurityConfig’s default penetration detection and enhanced mode settings. All systems running Guard Core within this version range are impacted, regardless of whether custom patterns are employed.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity, and while the EPSS score is not available, the flaw’s nature—an unbounded regular expression that can be triggered by simple input—suggests it could be abused with moderate effort. The vulnerability is not listed in the CISA KEV catalog, indicating no confirmed exploitation, but the lack of a timeout makes it theoretically exploitable via network requests to any exposed Guard Core instance. The likely attack vector is through ordinary HTTP requests to the protected endpoints; an unauthenticated attacker can send the crafted input and cause the server to freeze.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Guard Core to version 3.13.0 or later, which contains the patch for the quadratic ReDoS flaw.
  • After upgrading, restart the application to ensure the new configuration and pattern engine are in use.
  • If an immediate upgrade is not feasible, monitor API traffic for abnormal patterns of repeated opening braces and temporarily block or throttle such requests to mitigate the temporary impact.

Generated by OpenCVE AI on November 16, 2026 at 21:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title Guard Core: Quadratic ReDoS in built-in detection pattern freezes the event loop with a single request
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Subscriptions

No data.

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 16, 2026, 7:36 PM
Reserved
Nov 13, 2026, 10:30 PM
Status
Received
Published
Nov 16, 2026, 8:19 PM
Modified
Nov 16, 2026, 8:19 PM