spiral/stempler is vulnerable to Cross-Site Scripting (XSS)
61
Medium Risk
Stempler is the framework's default template engine and applies context-aware escaping to values echoed with the auto-escaping output syntax. For JavaScript event-handler attributes such as onclick and other on* handlers, the finalizer HTML-entity-encodes the value and wraps it in quotes instead of encoding it as a JavaScript literal. Because the browser HTML-decodes an event-handler attribute before the JavaScript engine parses it, user-supplied quotes are decoded back and can break out of the JavaScript string, yielding reflected or stored cross-site scripting through the supported safe syntax. The fix serializes the value with json_encode using the JSON_HEX_* flags and HTML-encodes the resulting literal so it survives both HTML and JavaScript decoding.
You are affected if you are using a version that falls within the vulnerable range and your templates render user-controlled data into an on* event-handler attribute using the auto-escaping output syntax.
spiral/stempler is vulnerable to Cross-Site Scripting (XSS) in versions 2.7.0 - 3.17.1.
Upgrade the spiral/stempler and/or the spiral/framework library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant