Vulnerabilities in pkg:pypi/slippers
PACKAGECVE-2026-34231 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Slippers libraries in the PyPI ecosystem. The issue involves slippers vulnerable to cross-site scripting (xss) in `attrs` template tag. Remediation is available by upgrading affected packages to version 0.6.3.
pkg:pypi/slippers
Vulnerability advisories affecting package pkg:pypi/slippers. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w7rv-gfp4-j9j3 | CVE-2026-34231 | MODERATE | Slippers Vulnerable to Cross-Site Scripting (XSS) in `attrs` Template Tag |
CVE-2026-34231 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-34231
To remediate this vulnerability, upgrade all affected Slippers dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install slippers>=0.6.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show slippers
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-34231, inspect your installed packages using pip:
pip show slippers
Analyze the terminal output to locate any version of Slippers in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.3), your application is affected.
Note: The pip show slippers command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Slippers, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-34231 Affected Slippers Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
slippers
|
PyPI |
< 0.6.3
|
0.6.3
|
References
Frequently Asked Questions
What is CVE-2026-34231?
Which Slippers versions are affected?
What version fixes CVE-2026-34231?
Is slippers affected?
What is the CVSS score of CVE-2026-34231?
What CWE is associated with CVE-2026-34231?
How can I check PyPI dependencies for CVE-2026-34231?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w7rv-gfp4-j9j3",
"modified" : "2026-03-31T18:55:30Z",
"published" : "2026-03-30T17:20:04Z",
"aliases" : [ "CVE-2026-34231" ],
"summary" : "Slippers Vulnerable to Cross-Site Scripting (XSS) in `attrs` Template Tag",
"details" : "## Summary\n\nA 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.\n\n## Vulnerability details\n\n### Root cause\n\n`AttrsNode` is a custom `Node` subclass registered via `register.tag()`. Unlike `register.simple_tag()`, which automatically applies `conditional_escape()` when autoescape is on, custom `Node.render()` methods receive no automatic escaping and are fully responsible for sanitising their output. `attr_string()` fails to do this:\n\n```python\ndef attr_string(key: str, value: Any):\n if isinstance(value, bool):\n return key if value else \"\"\n key = key.replace(\"_\", \"-\")\n return f'{key}=\"{value}\"' # value is not escaped\n```\n\n### Attack scenario\n\nGiven a template that uses `{% attrs %}` with a user-supplied value:\n\n```django\n{% load slippers %}\n<input {% attrs type placeholder %}>\n```\n\n```python\nrender(request, \"search.html\", {\"placeholder\": request.GET.get(\"q\", \"\")})\n```\n\nAn attacker crafting a request with `q=\" onmouseover=\"alert(document.cookie)\" x=\"` produces:\n\n```html\n<input type=\"text\" placeholder=\"\" onmouseover=\"alert(document.cookie)\" x=\"\">\n```\n\n## Impact\n\nAny template that passes values derived from user input, database content, or other untrusted sources to `{% attrs %}` is vulnerable. Successful exploitation can lead to session hijacking, credential theft, arbitrary actions on behalf of the victim, and page defacement.\n\n## Remediation\n\nReplace the f-string in `attr_string()` with `format_html()`, which escapes both key and value:\n\n```python\nfrom django.utils.html import format_html\n\ndef attr_string(key: str, value: Any):\n if isinstance(value, bool):\n return key if value else \"\"\n key = key.replace(\"_\", \"-\")\n return format_html('{}=\"{}\"', key, value)\n```\n\nUntil a patch is available, sanitise untrusted values before passing them to `{% attrs %}`, for example with `django.utils.html.escape()` in the view layer.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "slippers"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.6.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mixxorz/slippers/security/advisories/GHSA-w7rv-gfp4-j9j3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34231"
}, {
"type" : "WEB",
"url" : "https://github.com/mixxorz/slippers/commit/16cc4ef4fa8ad2f7aee30798f16c3e7b653423b2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mixxorz/slippers"
}, {
"type" : "WEB",
"url" : "https://github.com/mixxorz/slippers/releases/tag/0.6.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-30T17:20:04Z",
"nvd_published_at" : "2026-03-31T16:16:32Z"
}
}