cve.bz

CVE-2021-45452 Path traversal

5.3 mediumEPSS 2.6%Fix available

Medium (5.3). EPSS 2.6% estimated probability of exploitation activity in the next 30 days. Fixed in django 2.2.26, 3.2.11, 4.0.1.

On this page
Storage.save in Django 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1 allows directory traversal if crafted filenames are directly passed to it.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS
2.6% (unchanged from 2.6% a week ago; 2.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 86th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-45452 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-45452?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-45452?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-45452 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
djangoproject:djangofrom 2.2 before 2.2.26
djangoproject:djangofrom 3.2 before 3.2.11
djangoproject:djangofrom 4.0 before 4.0.1
fedoraproject:fedora35

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-jrh2-hc4r-7jwxPyPIdjango>=2.2 <2.2.262.2.26
GHSA-jrh2-hc4r-7jwxPyPIdjango>=3.2 <3.2.113.2.11
GHSA-jrh2-hc4r-7jwxPyPIdjango>=4.0 <4.0.14.0.1
PYSEC-2022-3PyPIdjango>=2.2 <2.2.26
>=3.2 <3.2.11
>=4.0 <4.0.1
2.2.26, 3.2.11, 4.0.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python-django1:1.11.29-1+deb10u4DLA-3191-1
Debian12, 13, 14python-django2:3.2.11-1DEBIAN-CVE-2021-45452
Ubuntu18.04:LTSpython-django1:1.11.11-1ubuntu1.15UBUNTU-CVE-2021-45452 USN-5204-1
Ubuntu20.04:LTSpython-django2:2.2.12-1ubuntu0.9UBUNTU-CVE-2021-45452 USN-5204-1
UbuntuPro:14.04:LTS, Pro:16.04:LTSpython-djangono fix listedUBUNTU-CVE-2021-45452
Red Hatsatellite:6.11::el7candlepin0:4.1.13-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-actionpack0:6.0.4.7-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-puma, tfm-rubygem-puma-debuginfo0:5.6.2-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-sidekiq0:5.2.10-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7libsolv0:0.7.22-1.el7pcRHSA-2022:5498
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7, satellite_utils:6.11::el7foreman0:3.1.1.21-2.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7, satellite_utils:6.11::el7satellite0:6.11.0-2.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el8candlepin0:4.1.13-1.el8satRHSA-2022:5498
Red Hatsatellite:6.11::el8rubygem-actionpack0:6.0.4.7-1.el8satRHSA-2022:5498
Red Hatsatellite:6.11::el8rubygem-puma, rubygem-puma-debuginfo, rubygem-puma-debugsource0:5.6.2-1.el8satRHSA-2022:5498
Red Hatsatellite:6.11::el8rubygem-sidekiq0:5.2.10-1.el8satRHSA-2022:5498
Red Hatsatellite:6.11::el8, satellite_capsule:6.11::el8libsolv0:0.7.22-1.el8pcRHSA-2022:5498
5 more for Red Hat in the JSON and on Red Hat's page.
SUSEHPE Helion OpenStack 8venv-openstack-horizon-hpe12.0.5~dev6-14.43.2SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-aodh5.1.1~dev7-12.37.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-barbican5.0.2~dev3-12.38.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-ceilometer9.0.8~dev7-12.35.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-cinder11.2.3~dev29-14.39.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-designate5.0.3~dev7-12.36.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-freezer5.0.0.0~xrc2~dev2-10.33.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-glance15.0.3~dev3-12.36.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-heat9.0.8~dev22-12.40.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-ironic9.1.8~dev8-12.38.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-keystone12.0.4~dev11-11.40.1SUSE-SU-2022:0286-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-magnum5.0.2_5.0.2_5.0.2~dev31-11.37.1SUSE-SU-2022:0286-1
15 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-1
openSUSETumbleweedpython-Django4.0.1-1.1openSUSE-SU-2024:11725-1
openSUSETumbleweedpython-Django5.1.5-1.1openSUSE-SU-2025:14662-1
openSUSETumbleweedpython-Django44.2.14-1.1openSUSE-SU-2024:14208-1
openSUSETumbleweedpython-Django44.2.30-4.1openSUSE-SU-2026:11235-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0-1.1openSUSE-SU-2026:10005-1
Rocky Linux8libdb0:5.3.28-42.el8_4RLSA-2022:5498
Alpinev3.16, v3.17, v3.18 and 6 morepy3-django3.2.12-r0ALPINE-CVE-2021-45452

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

In Red Hat OpenStack Platform, because the flaw's impact is lower and the impacted functionality is not directly used, no update will be provided at this time for the python-django20 package.

ProductPackageStateAdvisory
Red Hat Satellite 6.11 for RHEL 8python-django-0:3.2.13-1.el8pcFixed 2022-07-05RHSA-2022:5498
Red Hat Ansible Automation Platform 1.2python-djangoAffected
Red Hat Ansible Automation Platform 2python-djangoAffected
Red Hat Ansible Tower 3djangoAffected
Red Hat Ceph Storage 2calamari-serverOut of support scope
Red Hat Ceph Storage 2python-djangoOut of support scope
Red Hat Ceph Storage 3python-djangoOut of support scope
Red Hat OpenStack Platform 13 (Queens)python-djangoOut of support scope
Red Hat OpenStack Platform 16.1python-django20Will not fix
Red Hat OpenStack Platform 16.2python-django20Will not fix
Red Hat Satellite 6python3-djangoAffected
Red Hat Storage 3python-djangoNot affected
Red Hat Update Infrastructure 3 for Cloud Providerspython-djangoWill not fix
Red Hat Update Infrastructure 4 for Cloud Providerspython-djangoAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-45452.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON