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.
CVE-2021-31542
This high-severity CVE scores 7.5 under NVD CVSS v3. EPSS exploit probability: 5.3%, top 8% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 7.5
- EG Score
- 7.5(medium)
- EG Risk
- 40(Track)EG Risk 40/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity75% × 45%Exploitation5% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 5%
- EPSS %ILE
- 92%
- KEV
- Not listed
Published
May 5, 2021
Last Modified
November 21, 2024
References (22)
- cve@mitrehttp://www.openwall.com/lists/oss-security/2021/05/04/3
- cve@mitrehttps://docs.djangoproject.com/en/3.2/releases/security/
- cve@mitrehttps://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d
- cve@mitrehttps://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48
- cve@mitrehttps://github.com/django/django/commit/c98f446c188596d4ba6de71d1b77b4a6c5c2a007
- cve@mitrehttps://groups.google.com/forum/#%21forum/django-announce
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2021/05/msg00005.html
- cve@mitrehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/
- cve@mitrehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
- cve@mitrehttps://security.netapp.com/advisory/ntap-20210618-0001/
- cve@mitrehttps://www.djangoproject.com/weblog/2021/may/04/security-releases/
- af854a3a-2127-422b-91ae-364da2661108http://www.openwall.com/lists/oss-security/2021/05/04/3
- af854a3a-2127-422b-91ae-364da2661108https://docs.djangoproject.com/en/3.2/releases/security/
- af854a3a-2127-422b-91ae-364da2661108https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d
- af854a3a-2127-422b-91ae-364da2661108https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48
Vendor Advisories for CVE-2021-31542(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(4)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | python3-django (2:2.2.20-1ubuntu0.1) @ hirsute | 2026-05-26 | ubuntu |
| ubuntu | python3-django (1.8.7-1ubuntu5.15+esm1) @ xenial | 2026-05-26 | ubuntu |
| redhat | python-django20-0:2.0.13-16.el8ost.1 | 2021-12-09 | redhat |
| redhat | python3-django-0:2.2.24-1.el7pc | 2021-11-16 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(7 across 7 ecosystems)
Debian:10(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | 1:1.11.21-1 ... 1:1.11.29-1~deb10u1 (16 versions) | 1:1.11.29-1+deb10u11 | — |
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | — | 2:2.2.21-1 | — |
Debian:12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | — | 2:2.2.21-1 | — |
Debian:13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | — | 2:2.2.21-1 | — |
Debian:14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | — | 2:2.2.21-1 | — |
Debian:9(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| python-django | 1:1.10.7-2 ... 1:1.10.7-2+deb9u9 (13 versions) | 1:1.10.7-2+deb9u13 | — |
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| django | 2.2 ... 3.2 (31 versions) | 3.2.1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(3)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 7× in last 7d / 31× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 153 total refreshes for this CVE.
- 2026-09-18 19:23 UTCEPSS rescore
- 2026-09-17 19:23 UTCEPSS rescore
- 2026-09-17 19:23 UTCEPSS rescore
- 2026-09-16 14:05 UTCEPSS rescore
- 2026-09-16 14:05 UTCEPSS rescore
- 2026-09-15 03:06 UTCEPSS rescore
- 2026-09-12 14:57 UTCEPSS rescore
- 2026-09-11 14:49 UTCEPSS rescore
- 2026-09-11 09:33 UTCEPSS rescore
- 2026-09-08 21:56 UTCEPSS rescore
- 2026-09-07 15:58 UTCEPSS rescore
- 2026-09-06 17:43 UTCOSV refresh
- 2026-09-06 13:45 UTCEPSS rescore
- 2026-09-06 13:45 UTCEPSS rescore
- 2026-09-05 15:25 UTCEPSS rescore
- 2026-09-04 13:57 UTCEPSS rescore
- 2026-09-04 05:03 UTCEPSS rescore
- 2026-09-02 14:08 UTCEPSS rescore
- 2026-09-01 13:50 UTCEPSS rescore
- 2026-09-01 03:32 UTCEPSS rescore
- 2026-08-30 19:14 UTCEPSS rescore
- 2026-08-30 01:19 UTCEPSS rescore
- 2026-08-30 01:19 UTCEPSS rescore
- 2026-08-28 21:37 UTCEPSS rescore
- 2026-08-27 14:22 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-08-26 14:42 UTCEPSS rescore
- 2026-08-25 13:46 UTCEPSS rescore
- 2026-08-24 14:13 UTCEPSS rescore
- 2026-08-23 00:16 UTCEPSS rescore
- 2026-08-21 23:46 UTCEPSS rescore
- 2026-08-20 22:52 UTCEPSS rescore
- 2026-08-20 03:45 UTCOSV refresh
- 2026-08-19 17:01 UTCEPSS rescore
- 2026-08-18 13:45 UTCEPSS rescore
- 2026-08-17 13:44 UTCEPSS rescore
- 2026-08-16 14:53 UTCEPSS rescore
- 2026-08-16 02:11 UTCEPSS rescore
- 2026-08-16 02:11 UTCEPSS rescore
- 2026-08-15 01:27 UTCEPSS rescore
- 2026-08-13 21:57 UTCEPSS rescore
- 2026-08-12 13:48 UTCEPSS rescore
- 2026-08-11 13:38 UTCEPSS rescore
- 2026-08-09 13:44 UTCEPSS rescore
- 2026-08-08 16:33 UTCEPSS rescore
- 2026-08-07 16:24 UTCEPSS rescore
- 2026-08-06 13:43 UTCEPSS rescore
- 2026-08-05 19:14 UTCEPSS rescore
- 2026-08-04 22:41 UTCOSV refresh
- 2026-08-04 15:06 UTCEPSS rescore
- 2026-08-04 10:34 UTCEPSS rescore
- 2026-08-03 10:33 UTCEPSS rescore
- 2026-08-02 02:24 UTCEPSS rescore
- 2026-08-02 02:24 UTCEPSS rescore
- 2026-08-01 04:13 UTCEPSS rescore
- 2026-07-30 16:25 UTCEPSS rescore
- 2026-07-30 01:28 UTCEPSS rescore
- 2026-07-28 15:33 UTCEPSS rescore
- 2026-07-25 14:15 UTCEPSS rescore
- 2026-07-24 14:15 UTCEPSS rescore
- 2026-07-23 14:16 UTCEPSS rescore
- 2026-07-23 14:16 UTCEPSS rescore
- 2026-07-23 02:00 UTCEG score recompute
- 2026-07-22 22:47 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 20:59 UTCOSV refresh
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-07-01 04:18 UTCOSV refresh
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-28 14:05 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
- CVE-2001-0825EG 10.0HIGH
- CVE-2001-1009EG 10.0EPSS p93HIGH
- CVE-2001-0554EG 10.0EPSS p99HIGH
- CVE-2001-1162EG 10.0EPSS p96HIGH
- CVE-2001-0414EG 10.0EPSS p100HIGH
- CVE-2001-0191EG 10.0EPSS p92HIGH
- CVE-2001-0301EG 10.0EPSS p91HIGH
- CVE-2001-0197EG 10.0EPSS p96HIGH
- CVE-2001-0233EG 10.0EPSS p96HIGH
- CVE-2001-0010EG 10.0EPSS p98HIGH
Frequently asked(5)
What is CVE-2021-31542?
When was CVE-2021-31542 disclosed?
Is CVE-2021-31542 actively exploited?
What is the CVSS score of CVE-2021-31542?
How do I remediate CVE-2021-31542?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2021-31542
Is Your Infrastructure Affected by CVE-2021-31542?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.