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.
Severity (CVSS)
| Base score | 9.2 |
|---|---|
| Severity | Critical |
| Version | CVSS 4.0 |
| 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 |
| Provided by | CNA |
Weaknesses
- CWE-94 — Improper Control of Generation of Code ('Code Injection')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| up9inc | pybars4 | 0 to <=0.9.13 [affected] |
References
- https://github.com/vladko312/advisories/blob/702e98db9642ece70d9e2150076d8014ffec2db3/pybars3.md (third-party-advisory)
- https://github.com/up9inc/pybars4/blob/0.9.13/pybars/_compiler.py#L153-L154 (technical-description)
- https://github.com/up9inc/pybars4 (product)
- https://www.vulncheck.com/advisories/pybars4-through-0.9.13-code-injection-via-bracketed-path-segments (third-party-advisory)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 31 Oct 2026 07:01 UTC.