{"id":"CVE-2026-119717","kind":"vulnerability","aliases":["CVE-2026-119717"],"related":[],"title":"pybars4: crafted Handlebars templates run Python code in the app","description":"pybars4 through 0.9.13 contains a code injection vulnerability in pybars/_compiler.py that allows attackers to execute Python code via unescaped bracketed path segments in Handlebars templates. Attackers can supply a template with a crafted segment in a helper or block argument to break out of the generated resolve() string literal and execute code in the application process.","summary":"pybars4 is a Python library that renders Handlebars templates; through version 0.9.13, unescaped bracketed path segments let a template break out of generated code and execute Python in the host process. An attacker who can supply or influence a template can run arbitrary code as the application.","severity":"critical","cvss":9.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["handlebars","package","pybars4","python"],"not_affected_if":["fixed-templates-only"],"how_to_check":"- Check the installed version with `pip show pybars4` and look for versions up to `0.9.13`.\n- Search dependency files (`requirements.txt`, `poetry.lock`, `Pipfile.lock`) for `pybars4`.\n- Find code that compiles templates from user-supplied input when using pybars4.","fix":"- pybars4 versions through `0.9.13` are affected; 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:45+00:00","updated_at":"2026-10-30T16:31:45+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-30T16:31:45Z","model":"claude-haiku-5-5","output":{"fix":"- pybars4 versions through `0.9.13` are affected; the sources do not name a fixed version.","reach":"unknown","title":"pybars4: crafted Handlebars templates run Python code in the app","impact":"high","summary":"pybars4 is a Python library that renders Handlebars templates; through version 0.9.13, unescaped bracketed path segments let a template break out of generated code and execute Python in the host process. An attacker who can supply or influence a template can run arbitrary code as the application.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","pybars4","handlebars"],"confidence":0.6,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Attacker runs arbitrary Python code inside the application process","analyst_note":"Find a fixed pybars4 version or upstream advisory, and confirm whether template input must be attacker-controlled; check the NVD page https://nvd.nist.gov/vuln/detail/CVE-2026-119717.","how_to_check":"- Check the installed version with `pip show pybars4` and look for versions up to `0.9.13`.\n- Search dependency files (`requirements.txt`, `poetry.lock`, `Pipfile.lock`) for `pybars4`.\n- Find code that compiles templates from user-supplied input when using pybars4.","plain_action":"","needs_analyst":true,"not_affected_if":["fixed-templates-only"],"who_is_affected":"Applications that use pybars4 to compile Handlebars templates are exposed, most dangerously where templates or helper or block arguments come from untrusted users. Applications that only render fixed, developer-written templates with no user-controlled input are less exposed. The sources do not describe further conditions.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000731,"input_tokens":4146,"output_tokens":632,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-119717':13A,16A '-2026':12A,15A '0.9.13':32B,70C 'allow':79C 'app':10A 'applic':67B,122C 'arbitrari':63B 'argument':107C 'attack':53B,80C,93C 'block':106C 'bracket':34B,87C 'break':40B,109C 'code':7A,44B,64B,73C,84C,119C 'contain':71C 'craft':2A,100C 'cve':11A,14A 'execut':46B,82C,118C 'generat':43B,113C 'handlebar':3A,17B,28B,91C 'helper':104C 'host':50B 'influenc':58B 'inject':74C 'let':37B 'librari':25B 'liter':116C 'packag':18B 'path':35B,88C 'process':51B,123C 'pybars/_compiler.py':77C 'pybars4':1A,19B,21B,68C 'python':6A,20B,24B,47B,83C 'render':27B 'resolv':114C 'run':5A,62B 'segment':36B,89C,101C 'string':115C 'suppli':56B,95C 'templat':4A,29B,39B,60B,92C,97C 'unescap':33B,86C 'version':31B 'via':85C 'vulner':75C","nicknames":[],"mitigations":[],"who_affected":"Applications that use pybars4 to compile Handlebars templates are exposed, most dangerously where templates or helper or block arguments come from untrusted users. Applications that only render fixed, developer-written templates with no user-controlled input are less exposed. The sources do not describe further conditions.","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-119717","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119717","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"}