Vulnerabilities in pkg:pypi/slippers

PACKAGE
Advisory Identifier: GHSA-w7rv-gfp4-j9j3
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/slippers

1 Known Advisory Record(s)

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

CVE Identifier CVE-2026-34231
GHSA Identifier GHSA-w7rv-gfp4-j9j3
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Slippers
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

slippers fixed: 0.6.3
pip install slippers>=0.6.3
Verify Direct and Transitive Dependencies

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

## Summary 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. ## Vulnerability details ### Root cause `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: ```python def attr_string(key: str, value: Any): if isinstance(value, bool): return key if value else "" key = key.replace("_", "-") return f'{key}="{value}"' # value is not escaped ``` ### Attack scenario Given a template that uses `{% attrs %}` with a user-supplied value: ```django {% load slippers %} <input {% attrs type placeholder %}> ``` ```python render(request, "search.html", {"placeholder": request.GET.get("q", "")}) ``` An attacker crafting a request with `q=" onmouseover="alert(document.cookie)" x="` produces: ```html <input type="text" placeholder="" onmouseover="alert(document.cookie)" x=""> ``` ## Impact Any 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. ## Remediation Replace the f-string in `attr_string()` with `format_html()`, which escapes both key and value: ```python from django.utils.html import format_html def attr_string(key: str, value: Any): if isinstance(value, bool): return key if value else "" key = key.replace("_", "-") return format_html('{}="{}"', key, value) ``` Until a patch is available, sanitise untrusted values before passing them to `{% attrs %}`, for example with `django.utils.html.escape()` in the view layer.

CVE-2026-34231 Affected Slippers Versions

1 component(s)
Fixed Versions:
0.6.3
Product / Package Ecosystem Affected Versions Fixed Version
slippers
PyPI
< 0.6.3
0.6.3

References

Frequently Asked Questions

What is CVE-2026-34231?
CVE-2026-34231 is a security vulnerability in Slippers involving Slippers Vulnerable to Cross-Site Scripting (XSS) in `attrs` Template Tag under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Slippers versions are affected?
Affected versions include releases prior to 0.6.3 across affected packages: slippers.
What version fixes CVE-2026-34231?
Upgrading to 0.6.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is slippers affected?
Yes, slippers is affected in releases prior to 0.6.3. Upgrade your dependency to 0.6.3 or later.
What is the CVSS score of CVE-2026-34231?
CVE-2026-34231 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-34231?
CVE-2026-34231 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check PyPI dependencies for CVE-2026-34231?
Run the dependency tree command: 'pip show slippers'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}