{"id":"CVE-2026-129302","kind":"vulnerability","aliases":["CVE-2026-129302"],"related":[],"title":"Guard Core: crafted request blocks the event loop, stalling every endpoint","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.","summary":"Guard Core, the security engine behind the FastAPI-Guard, FlaskAPI Guard and DjAPI Guard adapters, runs a built-in template-injection pattern with quadratic cost on repeated opening braces. An unauthenticated request with that input blocks the shared asyncio event loop, so the whole application stops responding.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["django","fastapi","flask","guard-core","package","python","self-hosted"],"not_affected_if":["no-guard-adapter","version-outside-range"],"how_to_check":"- Check the installed `guard-core` version with `pip show guard-core`; versions from 3.5.0 up to but not including 3.13.0 are affected.\n- Check whether the application uses `SecurityConfig` with penetration detection and enhanced mode enabled, which is the default.","fix":"- `guard-core` `3.13.0`","status":"open","published_at":"2026-11-16T20:19:01+00:00","first_seen_at":"2026-11-16T20:38:45+00:00","triaged_at":"2026-11-16T20:39:31+00:00","updated_at":"2026-11-16T20:39:31+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-16T20:39:31Z","model":"claude-haiku-5-5","output":{"fix":"- `guard-core` `3.13.0`","reach":"internet","title":"Guard Core: crafted request blocks the event loop, stalling every endpoint","impact":"medium","summary":"Guard Core, the security engine behind the FastAPI-Guard, FlaskAPI Guard and DjAPI Guard adapters, runs a built-in template-injection pattern with quadratic cost on repeated opening braces. An unauthenticated request with that input blocks the shared asyncio event loop, so the whole application stops responding.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","fastapi","flask","django","guard-core","self-hosted"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Unauthenticated requests freeze the whole application's event loop, causing denial of service","analyst_note":"","how_to_check":"- Check the installed `guard-core` version with `pip show guard-core`; versions from 3.5.0 up to but not including 3.13.0 are affected.\n- Check whether the application uses `SecurityConfig` with penetration detection and enhanced mode enabled, which is the default.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["version-outside-range","no-guard-adapter"],"who_is_affected":"Applications built on the FastAPI-Guard, FlaskAPI Guard or DjAPI Guard adapters that pull in guard-core between 3.5.0 and 3.13.0. Stock SecurityConfig enables the affected detection path, so default configurations are exposed. Services that do not use these adapters, or run a version outside the range, can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.00078,"input_tokens":4799,"output_tokens":601,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-129302':14A,17A '-2026':13A,16A '3.13.0':101C,208C '3.5.0':99C 'adapt':44B,97C 'affect':175C 'api':83C 'applic':76B,177C 'asyncio':70B,172C 'ban':195C 'behavior':147C 'behind':34B 'block':5A,67B,169C 'brace':60B,152C 'built':48B,103C,135C 'built-in':47B,102C,134C 'call':118C 'complet':192C 'contain':141C 'content':117C 'core':2A,23B,30B,80C,85C 'core/handlers/suspatterns_handler.py':111C 'cost':56B 'counter':196C 'craft':3A 'creat':125C 'custom':131C 'cve':12A,15A 'detect':107C,155C,186C 'detector':140C 'direct':115C 'django':18B 'djapi':42B,95C 'enabl':160C 'endpoint':11A,178C 'engin':33B,86C 'enhanc':157C 'event':7A,71B,173C 'everi':10A 'execut':112C 'express':144C 'fastapi':19B,37B,90C 'fastapi-guard':36B,89C 'fix':205C 'flask':20B 'flaskapi':39B,92C 'guard':1A,22B,29B,38B,40B,43B,79C,91C,93C,96C,110C 'guard-cor':21B 'host':28B 'increment':194C 'inject':52B,139C 'input':66B,181C 'instead':119C 'issu':203C 'loop':8A,72B,174C 'match':187C 'matcher':127C 'mode':158C 'open':59B,151C 'packag':24B 'path':128C 'pattern':53B,108C,132C 'pattern.search':116C 'penetr':106C,154C 'penetration-detect':105C 'produc':184C 'protect':124C 'python':25B 'quadrat':55B,146C 'record':199C 'repeat':58B,150C 'request':4A,63B,167C,190C 'respond':78B 'run':45B 'safe':126C 'scan':149C 'secur':32B,84C 'securityconfig':164C 'self':27B 'self-host':26B 'share':69B,171C 'stall':9A 'stock':163C 'stop':77B 'suspici':201C 'templat':51B,138C 'template-inject':50B,137C 'timeout':123C 'timeout-protect':122C 'trigger':180C 'unauthent':62B,166C 'unbound':143C 'use':129C 'version':207C 'whole':75B 'without':193C","nicknames":[],"mitigations":[],"who_affected":"Applications built on the FastAPI-Guard, FlaskAPI Guard or DjAPI Guard adapters that pull in guard-core between 3.5.0 and 3.13.0. Stock SecurityConfig enables the affected detection path, so default configurations are exposed. Services that do not use these adapters, or run a version outside the range, can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["django","fastapi","flask","guardcore","high","package","python","selfhosted"],"campaign_type":null,"search_a":"'-129302':14A,17A '-2026':13A,16A 'block':5A 'core':2A 'craft':3A 'cve':12A,15A 'endpoint':11A 'event':7A 'everi':10A 'guard':1A 'loop':8A 'request':4A 'stall':9A","search_b":"'adapt':44B 'applic':76B 'asyncio':70B 'behind':34B 'block':67B 'brace':60B 'built':48B 'built-in':47B 'core':23B,30B 'cost':56B 'django':18B 'djapi':42B 'engin':33B 'event':71B 'fastapi':19B,37B 'fastapi-guard':36B 'flask':20B 'flaskapi':39B 'guard':22B,29B,38B,40B,43B 'guard-cor':21B 'host':28B 'inject':52B 'input':66B 'loop':72B 'open':59B 'packag':24B 'pattern':53B 'python':25B 'quadrat':55B 'repeat':58B 'request':63B 'respond':78B 'run':45B 'secur':32B 'self':27B 'self-host':26B 'share':69B 'stop':77B 'templat':51B 'template-inject':50B 'unauthent':62B 'whole':75B","search_c":"'3.13.0':101C,208C '3.5.0':99C 'adapt':97C 'affect':175C 'api':83C 'applic':177C 'asyncio':172C 'ban':195C 'behavior':147C 'block':169C 'brace':152C 'built':103C,135C 'built-in':102C,134C 'call':118C 'complet':192C 'contain':141C 'content':117C 'core':80C,85C 'core/handlers/suspatterns_handler.py':111C 'counter':196C 'creat':125C 'custom':131C 'detect':107C,155C,186C 'detector':140C 'direct':115C 'djapi':95C 'enabl':160C 'endpoint':178C 'engin':86C 'enhanc':157C 'event':173C 'execut':112C 'express':144C 'fastapi':90C 'fastapi-guard':89C 'fix':205C 'flaskapi':92C 'guard':79C,91C,93C,96C,110C 'increment':194C 'inject':139C 'input':181C 'instead':119C 'issu':203C 'loop':174C 'match':187C 'matcher':127C 'mode':158C 'open':151C 'path':128C 'pattern':108C,132C 'pattern.search':116C 'penetr':106C,154C 'penetration-detect':105C 'produc':184C 'protect':124C 'quadrat':146C 'record':199C 'repeat':150C 'request':167C,190C 'safe':126C 'scan':149C 'secur':84C 'securityconfig':164C 'share':171C 'stock':163C 'suspici':201C 'templat':138C 'template-inject':137C 'timeout':123C 'timeout-protect':122C 'trigger':180C 'unauthent':166C 'unbound':143C 'use':129C 'version':207C 'without':193C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-08-25T04:09:41+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-129302","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129302","severity":null,"published_at":"2026-11-16T20:19:01+00:00","modified_at":"2026-11-16T20:19:01+00:00","first_seen_at":"2026-11-16T20:38:45+00:00","fetched_at":"2026-11-16T20:38:45+00:00","note":null}],"documents":[{"id":172270,"url":"https://github.com/Guard-Core/guard-core/commit/c07239fa1c5aa93e3f179440e79dad652977d3e4","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":172271,"url":"https://github.com/Guard-Core/guard-core/releases/tag/3.13.0","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":172272,"url":"https://github.com/Guard-Core/guard-core/security/advisories/GHSA-r7hm-rjvg-xx7j","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-08-25T04:09:41+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}