CVE-2021-44649: Django cms Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-hx7c-qpfq-xcrp
CVSS 5.4
CWE-79
Published
Advisory Summary

CVE-2021-44649 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Django cms libraries in the PyPI ecosystem. The issue involves cross-site scripting in django-cms. Remediation is available by upgrading affected packages to version 3.7.4, 3.6.1, 3.5.4, 3.4.7.

CVE-2021-44649 at a Glance

CVE Identifier CVE-2021-44649
GHSA Identifier GHSA-hx7c-qpfq-xcrp
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Django cms
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2021-44649

To remediate this vulnerability, upgrade all affected Django cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

django-cms fixed: 3.7.4
pip install django-cms>=3.7.4
django-cms fixed: 3.6.1
pip install django-cms>=3.6.1
django-cms fixed: 3.5.4
pip install django-cms>=3.5.4
django-cms fixed: 3.4.7
pip install django-cms>=3.4.7
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 django-cms

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-44649, inspect your installed packages using pip:

pip show django-cms

Analyze the terminal output to locate any version of Django cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.4), your application is affected.

Note: The pip show django-cms 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 Django cms, 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

Django CMS 3.7.3 does not validate the plugin_type parameter while generating error messages for an invalid plugin type, resulting in a Cross Site Scripting (XSS) vulnerability. The vulnerability allows an attacker to execute arbitrary JavaScript code in the web browser of the affected user.

CVE-2021-44649 Affected Django cms Versions

4 component(s)
Fixed Versions:
3.7.43.6.13.5.43.4.7
Product / Package Ecosystem Affected Versions Fixed Version
django-cms
PyPI
≥ 3.7.0
< 3.7.4
3.7.4
django-cms
PyPI
≥ 3.6.0
< 3.6.1
3.6.1
django-cms
PyPI
≥ 3.5.0
< 3.5.4
3.5.4
django-cms
PyPI
≥ 3.4.0
< 3.4.7
3.4.7

References

Frequently Asked Questions

What is CVE-2021-44649?
CVE-2021-44649 is a security vulnerability in Django cms involving Cross-site Scripting in django-cms under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Django cms versions are affected?
Affected versions include releases prior to 3.7.4, 3.6.1, 3.5.4, 3.4.7 across affected packages: django-cms.
What version fixes CVE-2021-44649?
Upgrading to 3.7.4, 3.6.1, 3.5.4, 3.4.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is django-cms affected?
Yes, django-cms is affected in releases prior to 3.7.4, 3.6.1, 3.5.4, 3.4.7. Upgrade your dependency to 3.7.4, 3.6.1, 3.5.4, 3.4.7 or later.
What is the CVSS score of CVE-2021-44649?
CVE-2021-44649 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2021-44649?
CVE-2021-44649 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-2021-44649?
Run the dependency tree command: 'pip show django-cms'. 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-hx7c-qpfq-xcrp",
  "modified" : "2024-09-16T21:47:38Z",
  "published" : "2022-01-13T20:10:53Z",
  "aliases" : [ "CVE-2021-44649" ],
  "summary" : "Cross-site Scripting in django-cms",
  "details" : "Django CMS 3.7.3 does not validate the plugin_type parameter while generating error messages for an invalid plugin type, resulting in a Cross Site Scripting (XSS) vulnerability. The vulnerability allows an attacker to execute arbitrary JavaScript code in the web browser of the affected user.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.7.0"
      }, {
        "fixed" : "3.7.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.6.0"
      }, {
        "fixed" : "3.6.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.5.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-44649"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-hx7c-qpfq-xcrp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/divio/django-cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django-cms/PYSEC-2022-7.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://sahildhar.github.io/blogpost/Django-CMS-Reflected-XSS-Vulnerability"
  }, {
    "type" : "WEB",
    "url" : "https://www.django-cms.org/en/blog/2020/07/22/django-cms-security-updates-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-13T18:47:39Z",
    "nvd_published_at" : "2022-01-12T13:15:00Z"
  }
}