CVE-2020-24584: Django Django Incorrect Default Permissions Vulnerability

MODERATE
Advisory Identifier: GHSA-fr28-569j-53c4
CVSS 7.5
CWE-276
Published
Advisory Summary

CVE-2020-24584 is a MODERATE (CVSS 7.5) django incorrect default permissions vulnerability (CWE-276: Incorrect Default Permissions) affecting Django libraries in the PyPI ecosystem. The issue involves django incorrect default permissions. Remediation is available by upgrading affected packages to version 2.2.16, 3.0.10, 3.1.1.

CVE-2020-24584 at a Glance

CVE Identifier CVE-2020-24584
GHSA Identifier GHSA-fr28-569j-53c4
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-24584

To remediate this vulnerability, upgrade all affected Django 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 fixed: 2.2.16
pip install Django>=2.2.16
Django fixed: 3.0.10
pip install Django>=3.0.10
Django fixed: 3.1.1
pip install Django>=3.1.1
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

How to Check if You Are Affected

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

pip show Django

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

Note: The pip show Django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Django, 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

An issue was discovered in Django 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). The intermediate-level directories of the filesystem cache had the system's standard umask rather than 0o077.

CVE-2020-24584 Affected Django Versions

3 component(s)
Fixed Versions:
2.2.163.0.103.1.1
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 2.2
< 2.2.16
2.2.16
Django
PyPI
≥ 3.0
< 3.0.10
3.0.10
Django
PyPI
≥ 3.1
< 3.1.1
3.1.1

References

NVD — CVE-2020-24584 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-24584
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/1853724acaf17ed7414d54c7d2b5563a25025a71
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/2b099caa5923afa8cfb5f1e8c0d56b6e0e81915b
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/a3aebfdc8153dc230686b6d2454ccd32ed4c9e6f
Security Fix Commit FIX COMMIT
https://github.com/django/django/commit/cdb367c92a0ba72ddc0cbd13ff42b0e6df709554
Django Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2021.html
Django Security Information SECURITY
https://www.openwall.com/lists/oss-security/2020/09/01/2
Django Release RELEASE
https://www.djangoproject.com/weblog/2020/sep/01/security-releases
usn.ubuntu.com/4479-1 WEB
https://usn.ubuntu.com/4479-1
Django Security Information SECURITY
https://security.netapp.com/advisory/ntap-20200918-0004
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZCRPQCBTV3RZHKVZ6K6QOAANPRZQD3GI
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OLGFFLMF3X6USMJD7V5F5P4K2WVUTO3T
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2ZHO3GZCJMP3DDTXCNVFV6ED3W64NAU
groups.google.com/forum/ WEB
https://groups.google.com/forum/#!topic/django-announce/zFCMdgUnutU
groups.google.com/forum/ WEB
https://groups.google.com/forum/#!topic/django-announce/Gdqn58RqIDM
Django Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-34.yaml
Django Source Repository REPOSITORY
https://github.com/django/django
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-fr28-569j-53c4
Django Release RELEASE
https://docs.djangoproject.com/en/dev/releases/security

Frequently Asked Questions

What is CVE-2020-24584?
CVE-2020-24584 is a security vulnerability in Django involving Django Incorrect Default Permissions under CWE-276: Incorrect Default Permissions.
Which Django versions are affected?
Affected versions include releases prior to 2.2.16, 3.0.10, 3.1.1 across affected packages: Django.
What version fixes CVE-2020-24584?
Upgrading to 2.2.16, 3.0.10, 3.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 2.2.16, 3.0.10, 3.1.1. Upgrade your dependency to 2.2.16, 3.0.10, 3.1.1 or later.
What is the CVSS score of CVE-2020-24584?
CVE-2020-24584 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2020-24584?
CVE-2020-24584 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check PyPI dependencies for CVE-2020-24584?
Run the dependency tree command: 'pip show Django'. 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-fr28-569j-53c4",
  "modified" : "2024-11-18T16:26:10Z",
  "published" : "2021-03-18T20:30:01Z",
  "aliases" : [ "CVE-2020-24584" ],
  "summary" : "Django Incorrect Default Permissions",
  "details" : "An issue was discovered in Django 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). The intermediate-level directories of the filesystem cache had the system's standard umask rather than 0o077.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2"
      }, {
        "fixed" : "2.2.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.0.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1"
      }, {
        "fixed" : "3.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-24584"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/1853724acaf17ed7414d54c7d2b5563a25025a71"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/2b099caa5923afa8cfb5f1e8c0d56b6e0e81915b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/a3aebfdc8153dc230686b6d2454ccd32ed4c9e6f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/cdb367c92a0ba72ddc0cbd13ff42b0e6df709554"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.openwall.com/lists/oss-security/2020/09/01/2"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2020/sep/01/security-releases"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4479-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20200918-0004"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZCRPQCBTV3RZHKVZ6K6QOAANPRZQD3GI"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OLGFFLMF3X6USMJD7V5F5P4K2WVUTO3T"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F2ZHO3GZCJMP3DDTXCNVFV6ED3W64NAU"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/django-announce/zFCMdgUnutU"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/django-announce/Gdqn58RqIDM"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-34.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-fr28-569j-53c4"
  }, {
    "type" : "WEB",
    "url" : "https://docs.djangoproject.com/en/dev/releases/security"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-13T00:36:35Z",
    "nvd_published_at" : "2020-09-01T13:15:00Z"
  }
}