Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify app rendering untrusted Handlebars template source
-
ExploitCraft bracketed path segment in helper/block argument
-
ExecutionBreak out of generated Python string literal
-
ImpactExecute arbitrary Python in application process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the application feed attacker-controlled content into the Handlebars template SOURCE processed by pybars3 - specifically crafted bracketed path segments placed in helper or block arguments that escape the string literal in the Python code pybars3 compiles (per pybars/_compiler.py L159-160). The decisive limiting factor is deployment design: applications that render only trusted, developer-authored templates and pass untrusted values only as runtime data are NOT exposed; only applications that accept untrusted users' template bodies (an SSTI-style exposure) are affected. The CVSS AC:H/AT:P metrics reflect this non-default precondition. No authentication is inherent to the flaw itself (PR:N), and no user interaction is required (UI:N), but the trigger beyond 'supply a crafted template' is not detailed in the available sources. |
| Impact | The input CVSS 4.0 score of 9.2 (Critical) reflects the worst-case impact of arbitrary Python execution (VC:H/VI:H/VA:H), but several signals temper real-world urgency. The vector itself encodes meaningful friction: AC:H and AT:P indicate the attack is not a simple default-config hit but depends on specific conditions, and the gating prerequisite from the description is that the application must render attacker-controlled Handlebars template source - not merely attacker-controlled data fed into a trusted template. This is effectively a server-side template injection (SSTI) class issue: it is a genuine RCE only for applications that let untrusted users author or supply template bodies, which is an uncommon design. The vuln.today Decision label is 'monitor' (not act_now/emergency), consistent with this conditional exploitation profile. No EPSS score was provided, so exploitation probability cannot be weighed. It is not listed in CISA KEV, so there is no evidence of active exploitation. Public advisories describing the technique exist (VulnCheck advisory and the independent vladko312 advisory), so the mechanism is documented, but the input does not confirm weaponized exploit code. Net: a high-impact but condition-dependent issue - a real priority for any product that exposes template authoring to untrusted input, and lower practical risk where only developer-authored static templates are used. Note the AV:N/PR:N framing describes severity reachability, not that every pybars3 deployment is remotely exploitable without the untrusted-template path. |
| Exploit ScenarioDerived | An application uses pybars3 to render Handlebars templates whose source is derived from untrusted input (e.g., a user-customizable report, email, or dashboard template). An attacker submits a template containing crafted bracketed path segments inside a helper or block argument that break out of the string literal in the Python code pybars3 generates, causing their Python to run in the application process. Public advisories (VulnCheck, vladko312) document the technique, though the input does not confirm working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Code injection in pybars3 through 0.9.7 lets anyone who can control the body of a Handlebars template escape the string literals emitted by pybars/_compiler.py and run arbitrary Python inside the host application process. The decisive exposure factor is deployment design: applications that only render trusted, developer-authored templates and pass untrusted values as runtime context data are not exposed, while applications that accept untrusted users' template source (an SSTI-style design) are. Impact is rated critical in the CVSS 4.0 vector (VC:H/VI:H/VA:H) but is gated by high attack complexity and a present attack prerequisite, no CISA KEV listing or confirmed working exploit code was identified at time of analysis, and the vuln.today decision label is monitor.
RemediationAI
No vendor-released patch or fixed version is identified at time of analysis; pybars3 through 0.9.7 is reported vulnerable and issue https://github.com/wbond/pybars3/issues/88 should be tracked for a maintainer fix (advisory details at https://www.vulncheck.com/advisories/pybars3-through-0.9.7-code-injection-via-bracketed-path-segments and https://github.com/vladko312/advisories/blob/702e98db9642ece70d9e2150076d8014ffec2db3/pybars3.md). The only complete fix the available sources support is not to let untrusted parties supply template source: treat Handlebars template bodies as code, restrict template authoring to trusted developers, and pass untrusted input exclusively as runtime context values rather than as template text - the trade-off is that any self-service or user-editable template feature must be removed or redesigned. Where user-authored templates are a product requirement, compile and render them in a separate low-privilege process or container with no access to application secrets or internal network, accepting the operational cost of a rendering boundary while recognizing that Python-level sandboxing inside the same interpreter is not a substitute for a patched compiler. Precompiling templates reduces risk only for the fixed, trusted template set; it does not remediate the flaw for templates generated from user input.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pybars3 is a Python implementation of Handlebars template rendering that works by translating templates into Python source rather than by interpreting a syntax tree at runtime. The reported flaw is in pybars/_compiler.py at lines 159-160, where bracketed path segments appearing in helper or block arguments are emitted into the generated Python without escaping, so a crafted segment can terminate the enclosing string literal and inject arbitrary Python statements that execute when the compiled template is called. This is CWE-94 (Improper Control of Generation of Code / code injection): the vulnerable component is the template-to-source translator, and the injected code inherits the privileges of the process performing the render. The CVSS vector supplied (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) and the independent assessment (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) both describe full confidentiality, integrity and availability loss within the application's own security scope, while AC:H and AT:P encode the non-default precondition that attacker-controlled text must reach the template source. The sources confirm the injection point and the class of input (bracketed segments in helper or block arguments) but do not detail any further trigger mechanics, so the precise conditions beyond supplying a crafted template body are not described in the available sources. Hostile input confined to the runtime data/context object does not traverse this code path, which is why the flaw is fundamentally an SSTI-style misconfiguration risk rather than a defect exploitable against every pybars3 deployment.
Know when Pybars3 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Arbitrary Python execution gives C:H/I:H/A:H; AC:H because exploitation depends on the app rendering untrusted template source; PR:N/UI:N as no auth or interaction is inherent once that path exists; S:U (code runs in the same process).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Articles & Coverage 1
Executive ViewAI
A critical code injection vulnerability in the pybars3 library (through version 0.9.7) allows arbitrary Python code execution within the host application process if untrusted users can supply Handlebars template source. This affects organizations that use pybars3 for server-side templating and accept user-controlled templates; leadership should care because successful exploitation could lead to full system compromise, data breach, and operational disruption. However, exposure is limited to deployments with untrusted template input; applications rendering only trusted templates are not exposed.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict template source editing to trusted users, implement strict input validation and allowlisting of Handlebars expressions, deploy runtime application self-protection (RAP) or WAF rules to block code injection attempts, and use sandboxing (e.g., separate low-privilege process) for rendering untrusted templates.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-114121
GHSA-xvx4-89q3-mchg
NVD
CVE.org
EPSS
Exploit-DB