pybars4 template engine lets crafted templates run Python code
If an app uses pybars4 to render Handlebars templates and lets outsiders supply or influence those templates, an attacker can make the app run their own Python code on the server. The attacker could then read or change data and take over th
| Severity | CriticalCVSS 9.2 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | UnclearNo fixed version published in the sources yet |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker crafts templateMalicious bracketed segment in helper or block argument
- 2App renders templatepybars4 compiles the template without escaping the segment
- 3Code breaks outSegment escapes the resolve() string literal
- 4Python code runsRuns inside the application process
- ResultAttacker executes code on the server
What happened
In pybars4 through 0.9.13, pybars/_compiler.py fails to escape bracketed path segments in Handlebars templates, so a crafted segment in a helper or block argument can break out of the generated resolve() string literal and execute arbitrary Python code in the application process.
Are you affected?
You are affected if you run pybars4 version 0.9.13 or earlier and render templates that can contain untrusted input.
pybars4 through 0.9.13
What to do
- Check whether your application uses pybars4 and which version is installed.
- Stop rendering untrusted or user-supplied Handlebars templates with pybars4 until a fixed version is installed.
- Update pybars4 to a version newer than 0.9.13 once the maintainers release a fix, and check the GitHub advisory GHSA-x54v-7mw2-5rrx for patch details.
- Run the application with least privileges and restrict outbound network access to limit damage if exploited.
Timeline
- 30 Oct 2026, 16:17 UTCPublicly disclosed
- 30 Oct 2026, 16:17 UTCReported by NVD · NVD
- 30 Oct 2026, 16:18 UTCPicked up by Zero Radar
- 30 Oct 2026, 20:26 UTCGitHub Advisory reported on it · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- CVE-2026-119717NVD · 30 Oct 2026, 16:17 UTC
- pybars4 through 0.9.13 contains a code injection vulnerability in pybars/_compiler.py that allows...GitHub Advisory · 30 Oct 2026, 18:32 UTC
Technical details
- ID
- CVE-2026-119717 · GHSA-x54v-7mw2-5rrx
- CVSS
- 9.2 / 10
- EPSS
- 0.6% chance of exploitation within 30 days
- Disclosed
- 30 Oct 2026, 16:17 UTC
- On Zero Radar
- 30 Oct 2026, 16:18 UTC (1 min after disclosure)
- Last change
- 30 Oct 2026, 20:26 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works