Template::Plugin::HTML
- <= 3.102
A vulnerability in the Template2 HTML plugin for Perl, affecting versions through 3.102, allows for Cross-Site Scripting (XSS) attacks by injecting HTML and JavaScript. The issue arises because the 'html_filter' function fails to properly escape single quotes, enabling code injection through HTML attributes. For instance, a variable containing a single quote could be injected into an attribute without proper sanitization. While the vulnerability primarily allows limited HTML and JavaScript injection, the exploitation of this flaw could be used to create more significant security issues, such as session hijacking or defacement.
Exploitation of this vulnerability creates a Cross-Site Scripting risk by allowing the injection of unescaped HTML and JavaScript into single-quoted attributes, which could be executed in the user's browser.
To reproduce this vulnerability, use the Template2 HTML plugin and apply the 'html_filter' function to a variable containing a single quote. The filter will not escape the single quote, allowing for the injection of HTML or JavaScript into a single-quoted attribute. This can be verified by injecting a JavaScript payload, such as an 'onclick' event, which would be executed when the attribute is triggered.
Users can update to the latest version of Template2, where this vulnerability has been addressed. Instructions for updating can be found in the Template2 GitHub repository.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.