ubuntu-cve-2024-21520
Vulnerability from osv_ubuntu
Published
2024-06-26 05:15
Modified
2025-10-24 05:06
Summary
Details

Versions of the package djangorestframework before 3.15.2 are vulnerable to Cross-site Scripting (XSS) via the break_long_headers template filter due to improper input sanitization before splitting and joining with
tags.


{
  "affected": [
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "python-djangorestframework",
            "binary_version": "3.3.2-2"
          },
          {
            "binary_name": "python3-djangorestframework",
            "binary_version": "3.3.2-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:16.04:LTS",
        "name": "djangorestframework",
        "purl": "pkg:deb/ubuntu/djangorestframework@3.3.2-2?arch=source\u0026distro=xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.4.3-2",
        "3.3.1-1",
        "3.3.2-1",
        "3.3.2-2"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "python-djangorestframework",
            "binary_version": "3.7.7-1"
          },
          {
            "binary_name": "python3-djangorestframework",
            "binary_version": "3.7.7-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:18.04:LTS",
        "name": "djangorestframework",
        "purl": "pkg:deb/ubuntu/djangorestframework@3.7.7-1?arch=source\u0026distro=bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.4.0-2",
        "3.7.7-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "python3-djangorestframework",
            "binary_version": "3.10.2-1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "djangorestframework",
        "purl": "pkg:deb/ubuntu/djangorestframework@3.10.2-1?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.9.0-2",
        "3.10.2-1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "python3-djangorestframework",
            "binary_version": "3.12.4-2.1ubuntu1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "djangorestframework",
        "purl": "pkg:deb/ubuntu/djangorestframework@3.12.4-2.1ubuntu1?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.12.1-1",
        "3.12.4-1",
        "3.12.4-2",
        "3.12.4-2ubuntu1",
        "3.12.4-2.1ubuntu1"
      ]
    },
    {
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "python3-djangorestframework",
            "binary_version": "3.14.0-2"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:24.04:LTS",
        "name": "djangorestframework",
        "purl": "pkg:deb/ubuntu/djangorestframework@3.14.0-2?arch=source\u0026distro=noble"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "3.14.0-2"
      ]
    }
  ],
  "aliases": [],
  "details": "Versions of the package djangorestframework before 3.15.2 are vulnerable to Cross-site Scripting (XSS) via the break_long_headers template filter due to improper input sanitization before splitting and joining with \u003cbr\u003e tags.",
  "id": "UBUNTU-CVE-2024-21520",
  "modified": "2025-10-24T05:06:51Z",
  "published": "2024-06-26T05:15:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2024-21520"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-21520"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/encode/django-rest-framework/pull/9435"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642"
    },
    {
      "type": "REPORT",
      "url": "https://security.snyk.io/vuln/SNYK-PYTHON-DJANGORESTFRAMEWORK-7252137"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/encode/django-rest-framework/commit/3b41f0124194430da957b119712978fa2266b642"
    }
  ],
  "related": [],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:P",
      "type": "CVSS_V4"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2024-21520"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…