Description
webpy web.py 0.76 is vulnerable to server-side template injection (SSTI). The template engine can be tricked into executing attacker-controlled template code that built-in security checks are designed to reject. When an application precompiles templates from a directory the attacker can write to and later renders them through the precompiled template loader, the sandbox is bypassed and the attacker's code runs, resulting in arbitrary Python code execution and OS command execution on the server.
Published: 2026-09-23
Score: 8.5 High
EPSS: n/a
KEV: No
Impact: Arbitrary code execution via Python and system commands
Action: Immediate Patch
AI Analysis

Impact

Web.py 0.76 contains a server‑side template injection flaw that allows attackers to trick the built‑in template engine into executing arbitrary Python code. By inserting malicious template expressions, the safeguard designed to reject such code can be bypassed; executing the template through the precompiled loader then causes the injected code to run, which can lead to OS command execution and full compromise of the host system.

Affected Systems

The vulnerability is limited to applications that use web.py 0.76 and enable precompilation of templates from directories that an attacker can write to. No additional vendor or product information is available, so the impact applies only to custom deployments that meet these conditions.

Risk and Exploitability

A remote attacker can exploit the flaw by sending a crafted HTTP request that writes a malicious template file to a writable template directory and then triggers its rendering. The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, yet the potential for arbitrary code execution makes the risk very high. The likely attack vector is the network‑based HTTP request that feeds both the template creation and execution processes.

Generated by OpenCVE AI on September 23, 2026 at 18:29 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade web.py to a newer release that removes the SSTI flaw
  • If an upgrade is not immediately possible, configure the application to deny write access to any directories used for precompiling templates
  • Disable precompilation entirely or restrict template loading to a trusted, non‑writable directory

Generated by OpenCVE AI on September 23, 2026 at 18:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 23 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 23 Sep 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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


Wed, 23 Sep 2026 18:45:00 +0000

Type Values Removed Values Added
Title Server‑Side Template Injection in web.py 0.76 Enables Arbitrary Python and OS Code Execution
Weaknesses CWE-94

Wed, 23 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
Description webpy web.py 0.76 is vulnerable to server-side template injection (SSTI). The template engine can be tricked into executing attacker-controlled template code that built-in security checks are designed to reject. When an application precompiles templates from a directory the attacker can write to and later renders them through the precompiled template loader, the sandbox is bypassed and the attacker's code runs, resulting in arbitrary Python code execution and OS command execution on the server.
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-09-23T18:21:44.394Z

Reserved: 2026-08-25T00:00:00.000Z

Link: CVE-2026-79310

cve-icon Vulnrichment

Updated: 2026-09-23T18:20:52.945Z

cve-icon NVD

Status : Received

Published: 2026-09-23T16:16:45.687

Modified: 2026-09-23T19:19:28.240

Link: CVE-2026-79310

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-23T18:30:06Z

Weaknesses
  • CWE-94

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