CVE-2026-119716

pybars3 through 0.9.7 and pybars4 through 0.9.13 Code Injection via Bracketed Path Segments

Published Oct 30, 2026 CVSS 4.0 · 9.3 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A flaw in the compiler routine of pybars3 and pybars4 allows any template author to insert unescaped bracketed path segments that are interpreted as Python code. When a template containing such a segment is compiled, the application executes the injected code inside the same process. This can lead to arbitrary code execution within the context of the running application, potentially granting the attacker full control if the process runs with elevated privileges.

Affected Systems

The vulnerability affects pybars3 versions up to 0.9.7 from the wbond project and pybars4 versions up to 0.9.13 from the up9inc project. Any installation of these libraries that compiles Handlebars templates is at risk.

Risk and Exploitability

The CVSS score of 9.3 indicates a critical severity. The EPSS score is less than 1%, suggesting a low but nonzero chance of exploitation. While the flaw is not listed in the CISA KEV catalog, it can be triggered by supplying a crafted template to any vulnerable application. Exploitation requires the ability to provide template content, making the attack vector local or remote template injection, and results in execution of arbitrary Python code within the application process.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest pybars3 release (≥0.9.8) or pybars4 release (≥0.9.14) which removes the unescaped bracket handling.
  • If an upgrade is not possible, restrict template creation to trusted personnel and audit all existing templates for unsafe bracketed path segments in helper or block arguments.
  • As a temporary safeguard, sanitize template inputs by escaping or rejecting any '[' or ']' characters in path segments before rendering them with pybars.

Generated by OpenCVE AI on November 2, 2026 at 23:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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. 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.
Title pybars3 through 0.9.7 Code Injection via Bracketed Path Segments pybars3 through 0.9.7 and pybars4 through 0.9.13 Code Injection via Bracketed Path Segments
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, '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'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Type Values Removed Values Added
First Time appeared Wbond
Wbond pybars3
Vendors & Products Wbond
Wbond pybars3
Type Values Removed Values Added
Description 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.
Title pybars3 through 0.9.7 Code Injection via Bracketed Path Segments
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, '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'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 6, 2026, 4:10 PM
Reserved
Oct 30, 2026, 2:49 PM
Status
Deferred
Published
Oct 30, 2026, 4:17 PM
Modified
Nov 6, 2026, 5:17 PM