Guard Core — основной движок безопасности API для адаптеров FastAPI-Guard, FlaskAPI Guard и DjAPI Guard. От 3.5.0 до 3.13.0, встроенные шаблоны обнаружения проникновения в guard_core/handlers/suspatterns_handler.py выполняются через прямой вызов pattern.search(content) вместо защищенного от таймаута пути create_safe_matcher(), используемого для пользовательских шаблонов. Встроенный детектор впрыска шаблона содержит неограниченное выражение с квадратичным поведением при сканировании повторных открывающих скобок.
Поскольку обнаружение проникновения и расширенный режим включены запасом SecurityConfig, неаутентифицированный запрос может блокировать общий цикл событий asyncio, затрагивая все конечные точки приложения. Инициирующий ввод не приводит к обнаружению соответствия, поэтому запрос может быть выполнен без увеличения счетчиков бана или записи как подозрительный. Эта проблема исправлена в версии 3.13.0.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v3.1