CVE-2026-34231
Received Received - Intake
Cross-Site Scripting in Slippers Django {% attrs %} Tag

Publication date: 2026-03-31

Last updated on: 2026-04-03

Assigner: GitHub, Inc.

Description
Slippers is a UI component framework for Django. Prior to version 0.6.3, a Cross-Site Scripting (XSS) vulnerability exists in the {% attrs %} template tag of the slippers Django package. When a context variable containing untrusted data is passed to {% attrs %}, the value is interpolated into an HTML attribute string without escaping, allowing an attacker to break out of the attribute context and inject arbitrary HTML or JavaScript into the rendered page. This issue has been patched in version 0.6.3.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-31
Last Modified
2026-04-03
Generated
2026-05-07
AI Q&A
2026-03-31
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
django slippers to 0.6.2 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-34231 is a Cross-Site Scripting (XSS) vulnerability in the {% attrs %} template tag of the slippers Django package prior to version 0.6.3.

The vulnerability occurs because the attr_string() function interpolates untrusted context variable values directly into HTML attribute strings without escaping them. This allows an attacker to inject arbitrary HTML or JavaScript by breaking out of the attribute context.

The root cause is that the custom Django template Node subclass AttrsNode, which registers the {% attrs %} tag, does not benefit from Django’s automatic escaping, requiring manual sanitization that was missing.

For example, an attacker can pass a crafted query parameter that injects event handlers like onmouseover, enabling execution of malicious scripts in the victim's browser.


How can this vulnerability impact me? :

This vulnerability can lead to several security impacts including session hijacking, credential theft, unauthorized actions performed on behalf of the user, and page defacement.

Because the injected scripts run in the context of the vulnerable web application, attackers can steal sensitive information or manipulate the user interface.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by identifying if your Django application uses the slippers package version prior to 0.6.3 and if the {% attrs %} template tag is used with untrusted input that is not properly escaped.

To detect exploitation attempts on your system, you can monitor HTTP requests for suspicious query parameters or payloads that attempt to inject HTML or JavaScript via the {% attrs %} tag. For example, look for parameters containing strings like: " onmouseover=", " onerror=", or other event handlers.

There are no specific built-in commands provided for detection, but you can use web server logs or intrusion detection systems to search for suspicious patterns.

  • Use grep or similar tools on your web server logs to find suspicious input, e.g.: grep -i 'onmouseover=' /var/log/nginx/access.log
  • Check your installed slippers package version with pip: pip show slippers
  • Search your Django templates for usage of the {% attrs %} tag to identify potentially vulnerable code.

What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation step is to upgrade the slippers package to version 0.6.3 or later, where the vulnerability has been patched.

If upgrading is not immediately possible, manually sanitize all untrusted input passed to the {% attrs %} template tag by escaping values in the view layer using Django's django.utils.html.escape() function.

Developers should ensure that the vulnerable f-string interpolation in the attr_string() function is replaced with Django's format_html() function, which properly escapes keys and values.

  • Upgrade slippers package: pip install --upgrade slippers (to version 0.6.3 or later)
  • Sanitize untrusted input before passing to {% attrs %} using django.utils.html.escape()
  • Review your code for usage of {% attrs %} and ensure proper escaping or upgrade.

How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability is a Cross-Site Scripting (XSS) issue that allows attackers to inject arbitrary HTML or JavaScript, potentially leading to session hijacking, credential theft, unauthorized actions, and page defacement.

Such impacts can affect compliance with common standards and regulations like GDPR and HIPAA because unauthorized access to user data or credentials may lead to data breaches and violations of data protection requirements.

However, the provided information does not explicitly discuss compliance implications or how this vulnerability directly affects adherence to these standards.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart