CVE-2026-79311 in webpyinfo

Summary

by MITRE • 09/22/2026

webpy web.py 0.76 is vulnerable to Cross Site Scripting (XSS) via render_jinja.__init__().

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 09/22/2026

The vulnerability identified in WebPy version 0.76 represents a significant security flaw within the framework's template rendering subsystem, specifically affecting the initialization process of the Jinja2 renderer interface known as render_jinja. This component is responsible for processing and outputting dynamic content to web clients by integrating Python logic with HTML templates. The core technical issue stems from insufficient input validation and sanitization mechanisms when handling variables passed through this specific rendering method. When user-supplied data or untrusted inputs are injected into template contexts without proper encoding, the application fails to neutralize special characters that have semantic meaning in Hypertext Markup Language (HTML) and JavaScript environments. This oversight allows an attacker to inject malicious script payloads directly into the rendered output stream, which is then executed by the victim's web browser upon page load or interaction.

From a technical perspective, this flaw aligns with Common Weakness Enumeration category CWE-79, commonly referred to as Improper Neutralization of Input During Web Page Generation Cross-site Scripting. The vulnerability manifests because the render_jinja._init_() method does not automatically apply context-aware escaping for all variable types or template blocks where dynamic content is inserted. In many web frameworks, developers rely on automatic escaping features provided by the underlying templating engine to prevent XSS attacks. However, in this specific implementation of WebPy 0.76, certain code paths bypass these safety checks, particularly when variables are explicitly marked as safe or when raw strings are passed through the rendering pipeline without explicit sanitization functions being invoked by the developer. This creates a predictable attack vector where malicious scripts can be embedded into page content, leading to potential session hijacking, credential theft, defacement of web pages, or redirection to phishing sites.

The operational impact of this vulnerability is severe for any application relying on WebPy 0.76 and utilizing Jinja2 templates with dynamic user input. Attackers leveraging Cross-Site Scripting can execute arbitrary JavaScript in the context of the vulnerable website's domain. This grants them access to sensitive information such as session cookies, authentication tokens, and personally identifiable information stored locally by the browser or accessible via client-side scripts. Furthermore, this vulnerability enables attackers to perform actions on behalf of authenticated users if they are logged into the target application at the time of exploitation. The attack can be delivered through various vectors including query parameters, form submissions, or HTTP headers that eventually find their way into template variables rendered by the compromised component.

To mitigate this risk, immediate remediation steps should focus on upgrading to a patched version of WebPy where these rendering safeguards have been reinforced. For applications unable to upgrade immediately due to compatibility constraints, developers must implement manual input validation and output encoding for all data passed through render_jinja._init_(). This involves ensuring that any user-controlled variable inserted into templates is explicitly escaped using the framework's built-in escaping functions or standard HTML entity encoding techniques before rendering. Additionally, implementing a Content Security Policy (CSP) header can provide an additional layer of defense by restricting the sources from which scripts are allowed to execute, thereby mitigating the impact even if script injection occurs. Regular security audits and static code analysis tools configured to detect XSS patterns in template files should also be employed to identify similar weaknesses across the application's codebase.

This vulnerability is categorized under MITRE ATT&CK technique T1059, which covers Command Line Interface execution via browser-based scripts, specifically falling within the sub-technique of Web Protocol exploitation for client-side attacks. The lack of proper sanitization in a widely used web framework highlights the critical importance of secure coding practices when integrating templating engines with dynamic data sources. Organizations must treat template rendering functions as potential attack surfaces requiring rigorous validation and encoding strategies to maintain the integrity and confidentiality of their web applications against cross-site scripting threats.

Responsible

MITRE

Reservation

08/25/2026

Disclosure

09/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!