CVE-2026-129302 in guard-coreinfo

Summary

by MITRE • 11/16/2026

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.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/16/2026

The vulnerability identified within Guard Core versions ranging from 3.5.0 to 3.13.0 represents a significant denial of service risk stemming from an inefficient regular expression implementation used for penetration detection. Guard Core serves as the foundational API security engine supporting adapters for FastAPI, Flask, and Django frameworks. The core issue lies in the execution path taken by built-in pattern handlers located within the guard_core/handlers/suspatterns_handler.py module. Unlike custom patterns which are processed through a timeout-protected create_safe_matcher function designed to prevent resource exhaustion, the built-in penetration-detection patterns execute via a direct call to pattern.search with content input without any such protective mechanisms or timeouts in place during that specific execution path.

This architectural inconsistency creates a critical flaw when processing inputs containing repeated opening braces. The template injection detector utilizes an unbounded regular expression that exhibits quadratic time complexity relative to the length of the input string when encountering these specific character sequences. In practical terms, this means that as the number of consecutive open braces increases, the computational effort required by the regex engine grows exponentially rather than linearly. This behavior is a classic example of catastrophic backtracking, where the regular expression engine attempts numerous combinations of matches before determining that no valid match exists for the given pattern constraints.

The operational impact of this vulnerability is severe due to the default configuration settings included with Guard Core. The stock SecurityConfig enables both penetration detection and enhanced mode by default, meaning that any incoming request will be subjected to these checks without requiring explicit user configuration or authentication. Consequently, an unauthenticated attacker can craft a malicious HTTP request containing a string of repeated opening braces to trigger this quadratic behavior. Because the regular expression is designed for template injection detection rather than simple syntax validation, it does not immediately reject such inputs as invalid; instead, it spends excessive CPU cycles attempting to resolve potential matches that ultimately do not exist in the context of valid template structures.

This resource exhaustion directly impacts the shared asyncio event loop within Python-based web applications using these frameworks. Since Python's asynchronous execution model relies on a single thread for handling concurrent requests, blocking this thread with computationally expensive regex operations effectively freezes all other application endpoints during the processing time. This results in a complete denial of service where legitimate users are unable to access any part of the API while the malicious request is being processed. The attack is particularly insidious because it does not produce a detection match, meaning the request completes its lifecycle without incrementing ban counters or triggering security alerts that would typically identify and block such abuse patterns.

From a classification perspective, this vulnerability aligns with CWE-400, which describes uncontrolled resource consumption leading to denial of service conditions. It also maps to ATT&CK technique T1499, specifically endpoint obstruction via application exhaustion, as the attacker leverages algorithmic complexity to degrade system performance rather than exploiting a logic flaw or buffer overflow. The lack of timeout protection in this specific code path contrasts sharply with industry best practices for handling untrusted input in security scanners and WAFs, where regex operations are typically sandboxed or limited by execution time limits to prevent such scenarios.

The recommended mitigation strategy involves upgrading Guard Core to version 3.13.0 or later, which addresses the root cause by ensuring that built-in patterns also utilize timeout-protected matching mechanisms similar to those used for custom patterns. For organizations unable to upgrade immediately, applying a WAF rule or middleware layer upstream of Guard Core can help filter out requests containing excessive sequences of special characters like open braces before they reach the vulnerable handler. Additionally, developers should review their security configurations to ensure that penetration detection features are not enabled by default in production environments unless strictly necessary and properly monitored for performance impacts. Regular auditing of regex patterns used in security tools is essential to prevent similar algorithmic complexity vulnerabilities from being introduced into application defenses.

Responsible

GitHub M

Reservation

11/13/2026

Disclosure

11/16/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!