{"id":"CVE-2026-119716","kind":"vulnerability","aliases":["CVE-2026-119716"],"related":[],"title":"pybars3: crafted templates run Python code in the application process","description":"pybars3 through 0.9.7 contains a code injection vulnerability in pybars/_compiler.py that allows template authors to execute Python code via unescaped bracketed path segments. Attackers can supply Handlebars templates with crafted segments in helper or block arguments to break out of string literals and execute Python in the application process.","summary":"pybars3 through 0.9.7 does not escape bracketed path segments in templates, so a template author can break out of string literals. An attacker who supplies a crafted Handlebars template gets Python code execution inside the application process.","severity":"critical","cvss":9.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["handlebars","package","pybars3","python"],"not_affected_if":["no-user-templates","pybars3-above-0.9.7"],"how_to_check":"- Check whether the project depends on `pybars3` (for example `pip show pybars3` or the lock file) and note the installed version.\n- Look for code paths that compile or render Handlebars templates from user-supplied or untrusted input.","fix":"- Move `pybars3` past `0.9.7`; the sources do not name a fixed version.","status":"open","published_at":"2026-10-30T16:17:55+00:00","first_seen_at":"2026-10-30T16:31:26+00:00","triaged_at":"2026-10-30T16:31:44+00:00","updated_at":"2026-10-30T16:31:44+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-30T16:31:44Z","model":"claude-haiku-5-5","output":{"fix":"- Move `pybars3` past `0.9.7`; the sources do not name a fixed version.","reach":"unknown","title":"pybars3: crafted templates run Python code in the application process","impact":"high","summary":"pybars3 through 0.9.7 does not escape bracketed path segments in templates, so a template author can break out of string literals. An attacker who supplies a crafted Handlebars template gets Python code execution inside the application process.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","pybars3","handlebars"],"confidence":0.7,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Attacker executes arbitrary Python code in the application process","analyst_note":"Confirm the fixed version and whether template authorship must be untrusted to exploit; check the NVD entry at https://nvd.nist.gov/vuln/detail/CVE-2026-119716.","how_to_check":"- Check whether the project depends on `pybars3` (for example `pip show pybars3` or the lock file) and note the installed version.\n- Look for code paths that compile or render Handlebars templates from user-supplied or untrusted input.","plain_action":"","needs_analyst":true,"not_affected_if":["no-user-templates","pybars3-above-0.9.7"],"who_is_affected":"Applications that install pybars3 up to 0.9.7 and let untrusted parties author or edit the Handlebars templates they render are exposed. Projects that only render their own fixed templates, with no user-supplied template text, are less exposed but should still upgrade when a fixed version is available.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000705,"input_tokens":4136,"output_tokens":583,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-119716':13A,16A '-2026':12A,15A '0.9.7':23B,60C 'allow':69C 'applic':9A,56B,105C 'argument':93C 'attack':43B,81C 'author':35B,71C 'block':92C 'bracket':27B,78C 'break':37B,95C 'code':6A,52B,63C,75C 'contain':61C 'craft':2A,47B,87C 'cve':11A,14A 'escap':26B 'execut':53B,73C,101C 'get':50B 'handlebar':17B,48B,84C 'helper':90C 'inject':64C 'insid':54B 'liter':41B,99C 'packag':18B 'path':28B,79C 'process':10A,57B,106C 'pybars/_compiler.py':67C 'pybars3':1A,19B,21B,58C 'python':5A,20B,51B,74C,102C 'run':4A 'segment':29B,80C,88C 'string':40B,98C 'suppli':45B,83C 'templat':3A,31B,34B,49B,70C,85C 'unescap':77C 'via':76C 'vulner':65C","nicknames":[],"mitigations":[],"who_affected":"Applications that install pybars3 up to 0.9.7 and let untrusted parties author or edit the Handlebars templates they render are exposed. Projects that only render their own fixed templates, with no user-supplied template text, are less exposed but should still upgrade when a fixed version is available.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"unknown","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T16:17:55+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-119716","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119716","severity":null,"published_at":"2026-10-30T16:17:55+00:00","modified_at":"2026-10-30T16:17:55+00:00","first_seen_at":"2026-10-30T16:31:26+00:00","fetched_at":"2026-10-30T16:31:26+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}