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.
Published: 2026-10-30
Score: 9.2 Critical
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Patch Now
AI Analysis

Impact

The vulnerability, classified as CWE-94, allows anyone able to supply a Handlebars template to inject and execute arbitrary Python code within the application process. The flaw arises in pybars3’s compiler module where bracketed path segments are not properly escaped, enabling crafted segments in helper or block arguments to break out of intended string literals. Because the injected code runs with the privileges of the host application, successful exploitation would grant full system control, representing a critical security risk.

Affected Systems

The affected product is pybars3 version 0.9.7 and earlier releases from wbond. The vulnerability is present in the compiler’s handling of bracketed path segments in all builds that include this module, so any Python application using pybars3 to render templates is vulnerable. The impact is confined to environments that accept user‑supplied Handlebars templates.

Risk and Exploitability

The CVSS score of 9.2 indicates critical severity, and the vulnerability is currently not listed in the CISA KEV catalog. The EPSS score is not available, so the precise likelihood of exploitation is unknown; however, the nature of the flaw—executable code injection from templates—makes it highly attractive to attackers who can influence template content. In practice, any party that can deliver a template is able to trigger the injection, meaning the attack vector is local to the application’s template‑accepting interface but can lead to system‑wide compromise.

Generated by OpenCVE AI on October 30, 2026 at 16:32 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest pybars3 release (≥0.9.8) which removes the unescaped bracket handling.
  • If an upgrade cannot be applied immediately, restrict template creation to trusted personnel only and audit all existing templates for unsafe bracketed path segments.
  • As a temporary safeguard, sanitize template inputs by escaping or rejecting any '[' or ']' characters in path segments before delivering them to pybars3.

Generated by OpenCVE AI on October 30, 2026 at 16:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 30 Oct 2026 15:30:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-30T15:16:14.237Z

Reserved: 2026-10-30T14:49:27.152Z

Link: CVE-2026-119716

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T16:17:55.013

Modified: 2026-10-30T16:17:55.013

Link: CVE-2026-119716

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T16:45:15Z

Weaknesses
  • CWE-94

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