Description
pybars3 through 0.9.7 and pybars4 through 0.9.13 contain 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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| wbond | pybars3 | ≤ 0.9.7 | — |
| up9inc | pybars4 | ≤ 0.9.13 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-pybars3 | 0.9.7-3.1 | openSUSE-SU-2026:12503-1 |
Advisories 1
- openSUSE-SU-2026:12503-1 python313-pybars3-0.9.7-3.1 on GA media SUSE / openSUSE Security Updates · Nov 10, 2026
References
- GitHub Issue #88 issue-tracking
- https://github.com/wbond/pybars3 product
- https://github.com/up9inc/pybars4 product
- https://github.com/vladko312/advisories/blob/702e98db9642ece70d9e2150076d8014ffec2db3/pybars3.md third-party-advisory
- https://github.com/wbond/pybars3/blob/0.9.7/pybars/_compiler.py#L159-L160 technical-description
- https://github.com/up9inc/pybars4/blob/0.9.13/pybars/_compiler.py#L153-L154 technical-description
- VulnCheck Advisory: pybars3 through 0.9.7 Code Injection via Bracketed Path Segments third-party-advisory