Vulnerability Name:

CVE-2021-31542 (CCN-201213)

Assigned:2021-05-04
Published:2021-05-04
Updated:2022-06-28
Summary:In Django 2.2 before 2.2.21, 3.1 before 3.1.9, and 3.2 before 3.2.1, MultiPartParser, UploadedFile, and FieldFile allowed directory traversal via uploaded files with suitably crafted file names.
CVSS v3 Severity:7.5 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)
6.5 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): None
Availibility (A): None
5.3 Medium (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)
4.6 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): Low
Integrity (I): None
Availibility (A): None
CVSS v2 Severity:5.0 Medium (CVSS v2 Vector: AV:N/AC:L/Au:N/C:P/I:N/A:N)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): None
Availibility (A): None
5.0 Medium (CCN CVSS v2 Vector: AV:N/AC:L/Au:N/C:P/I:N/A:N)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): None
Availibility (A): None
Vulnerability Type:CWE-22
Vulnerability Consequences:Obtain Information
References:Source: MITRE
Type: CNA
CVE-2021-31542

Source: MISC
Type: Mailing List, Patch, Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/05/04/3

Source: MISC
Type: Patch, Vendor Advisory
https://docs.djangoproject.com/en/3.2/releases/security/

Source: XF
Type: UNKNOWN
django-cve202131542-dir-traversal(201213)

Source: CCN
Type: Django GIT Repository
[3.2.x] Fixed CVE-2021-31542 -- Tightened path & file name sanitation

Source: MISC
Type: Release Notes, Third Party Advisory
https://groups.google.com/forum/#!forum/django-announce

Source: MLIST
Type: Mailing List, Third Party Advisory
[debian-lts-announce] 20210506 [SECURITY] [DLA 2651-1] python-django security update

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2022-e7fd530688

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2021-01044b8a59

Source: CCN
Type: oss-sec Mailing List, Tue, 4 May 2021 10:58:23 +0200
Django 3.2.1, 3.1.9, and 2.2.21: CVE-2021-31542: Potential directory-traversal via uploaded files

Source: CONFIRM
Type: Third Party Advisory
https://security.netapp.com/advisory/ntap-20210618-0001/

Source: MISC
Type: Release Notes, Vendor Advisory
https://www.djangoproject.com/weblog/2021/may/04/security-releases/

Vulnerable Configuration:Configuration 1:
  • cpe:/a:djangoproject:django:*:*:*:*:*:*:*:* (Version >= 3.2 and < 3.2.1)
  • OR cpe:/a:djangoproject:django:*:*:*:*:*:*:*:* (Version >= 3.1 and < 3.1.9)
  • OR cpe:/a:djangoproject:django:*:*:*:*:*:*:*:* (Version >= 2.2 and < 2.2.21)

  • Configuration 2:
  • cpe:/o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:34:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:35:*:*:*:*:*:*:*

  • Configuration CCN 1:
  • cpe:/a:djangoproject:django:2.2:*:*:*:*:*:*:*
  • OR cpe:/a:djangoproject:django:3.1:*:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:org.opensuse.security:def:113248
    P
    python36-Django-3.2.7-2.3 on GA media (Moderate)
    2022-01-17
    oval:org.opensuse.security:def:106660
    P
    python36-Django-3.2.7-2.3 on GA media (Moderate)
    2021-10-01
    oval:org.opensuse.security:def:84643
    P
    Security update for ardana-cobbler, cassandra, cassandra-kit, crowbar-core, crowbar-openstack, documentation-suse-openstack-cloud, grafana, kibana, openstack-heat-templates, openstack-monasca-installer, openstack-nova, python-Django, python-elementpath, python-eventlet, python-py, python-pysaml2, python-six, python-xmlschema (Moderate)
    2021-07-28
    oval:org.opensuse.security:def:84184
    P
    Security update for ardana-cobbler, cassandra, cassandra-kit, crowbar-core, crowbar-openstack, documentation-suse-openstack-cloud, grafana, kibana, openstack-heat-templates, openstack-monasca-installer, openstack-nova, python-Django, python-elementpath, python-eventlet, python-py, python-pysaml2, python-six, python-xmlschema (Moderate)
    2021-07-28
    oval:org.opensuse.security:def:88141
    P
    Security update for ardana-neutron, ardana-swift, cassandra, crowbar-openstack, grafana, kibana, openstack-dashboard, openstack-ironic, openstack-neutron, openstack-neutron-gbp, openstack-nova, python-Django1, python-py, python-pysaml2, python-xmlschema, rubygem-activerecord-session_store, venv-openstack-keystone (Moderate)
    2021-06-11
    oval:org.opensuse.security:def:81082
    P
    Security update for crowbar-openstack, grafana, kibana, monasca-installer, python-Django, python-py, rubygem-activerecord-session_store (Moderate)
    2021-06-11
    oval:org.opensuse.security:def:88454
    P
    Security update for ardana-neutron, ardana-swift, cassandra, crowbar-openstack, grafana, kibana, openstack-dashboard, openstack-ironic, openstack-neutron, openstack-neutron-gbp, openstack-nova, python-Django1, python-py, python-pysaml2, python-xmlschema, rubygem-activerecord-session_store, venv-openstack-keystone (Moderate)
    2021-06-11
    BACK
    djangoproject django *
    djangoproject django *
    djangoproject django *
    debian debian linux 9.0
    fedoraproject fedora 34
    fedoraproject fedora 35
    djangoproject django 2.2
    djangoproject django 3.1