Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2025-32873

An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-32873
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:56 UTC · Revision 1

Source evidence

CVE-2025-32873

core-osv · Original source

Published 8 May 2025, 00:00 UTC

An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().

osv:CVE-2025-32873
Complete source record
{
  "id": "fe29facb782675990204895ebacfccf3fe075706b20d4517b6df1aae109f6a65",
  "url": "https://osv.dev/vulnerability/CVE-2025-32873",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2025-32873",
    "summary": "An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().",
    "evidence": "osv:CVE-2025-32873",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-32873",
      "aliases": [
        "BIT-django-2025-32873",
        "CVE-2025-32873",
        "GHSA-8j24-cjrq-gr2m",
        "PYSEC-2025-37"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "87175d270aec969d3cad4bad1abf45e07302d795"
                },
                {
                  "introduced": "84d09a547fe35e10018ab242602ca76c29ca91a1"
                },
                {
                  "fixed": "db5c8a97bb084cee880e678681d63bddecf6d38b"
                },
                {
                  "introduced": "9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"
                },
                {
                  "last_affected": "9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.2.0"
                      },
                      {
                        "fixed": "4.2.21"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.1"
                      },
                      {
                        "fixed": "5.1.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:5.2:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.2"
                      },
                      {
                        "last_affected": "5.2"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "5.2",
            "5.1.8",
            "4.2.20",
            "5.1.7",
            "5.1.6",
            "4.2.19",
            "4.2.18",
            "5.1.5",
            "4.2.17",
            "5.1.4",
            "5.1.3",
            "5.1.2",
            "4.2.16",
            "5.1.1",
            "5.1",
            "4.2.15",
            "5.1rc1",
            "4.2.14",
            "5.1b1",
            "5.1a1",
            "4.2.13",
            "4.2.12",
            "4.2.11",
            "4.2.10",
            "4.2.9",
            "4.2.8",
            "4.2.7",
            "4.2.6",
            "4.2.5",
            "4.2.4",
            "4.2.3",
            "4.2.2",
            "4.2.1",
            "4.2",
            "4.2rc1",
            "4.2b1",
            "4.2a1",
            "1.7a2",
            "1.4",
            "1.3",
            "1.2.1",
            "1.2",
            "1.1",
            "1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-32873.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.532020645Z",
      "provider": "osv",
      "references": [
        "https://docs.djangoproject.com/en/dev/releases/security/",
        "https://groups.google.com/g/django-announce",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32873.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-32873",
        "https://www.djangoproject.com/weblog/2025/may/07/security-releases/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-770"
        ],
        "cna_assigner": "mitre",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.2"
                  },
                  {
                    "fixed": "4.2.21"
                  },
                  {
                    "introduced": "5.1"
                  },
                  {
                    "fixed": "5.1.9"
                  },
                  {
                    "introduced": "5.2"
                  },
                  {
                    "fixed": "5.2.1"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/32xxx/CVE-2025-32873.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-32873",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509218,
  "published_at": "2025-05-08T00:00:00+00:00"
}