---
id: "CVE-2026-119716"
kind: "vulnerability"
aliases: ["CVE-2026-119716"]
title: "pybars3: crafted templates run Python code in the application process"
severity: "critical"
cvss: 9.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["handlebars", "package", "pybars3", "python"]
not_affected_if: ["no-user-templates", "pybars3-above-0.9.7"]
published_at: "2026-10-30T16:17:55+00:00"
first_seen_at: "2026-10-30T16:31:26+00:00"
updated_at: "2026-10-30T16:31:44+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119716", "first_seen_at": "2026-10-30T16:31:26+00:00"}]
---

# pybars3: crafted templates run Python code in the application process

pybars3 through 0.9.7 does not escape bracketed path segments in templates, so a template author can break out of string literals. An attacker who supplies a crafted Handlebars template gets Python code execution inside the application process.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the project depends on `pybars3` (for example `pip show pybars3` or the lock file) and note the installed version.
- Look for code paths that compile or render Handlebars templates from user-supplied or untrusted input.

## Fix

- Move `pybars3` past `0.9.7`; the sources do not name a fixed version.

## Timeline

- 2026-10-30T16:31:26+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119716

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
