Vulnerability · Published Feb 2, 2021 · Assigned by mitre
CVE-2021-3281
Medium 5.3
In plain English
A medium-severity security flaw in the py3-django package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 7.6% (higher than 95% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)5.3Medium
Exploit odds (30 days)7.6%top 5.4% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC
Official description
In Django 2.2 before 2.2.18, 3.0 before 3.0.12, and 3.1 before 3.1.6, the django.utils.archive.extract method (used by "startapp --template" and "startproject --template") allows directory traversal via an archive with absolute paths or relative paths with dot segments.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-django | 3.1.6-r0 | ALPINE-CVE-2021-3281 |
| Alpine:v3.21 | py3-django | 3.1.6-r0 | ALPINE-CVE-2021-3281 |
| Alpine:v3.22 | py3-django | 3.1.6-r0 | ALPINE-CVE-2021-3281 |
| Alpine:v3.23 | py3-django | 3.1.6-r0 | ALPINE-CVE-2021-3281 |
| Alpine:v3.24 | py3-django | 3.1.6-r0 | ALPINE-CVE-2021-3281 |
| Debian:12 | python-django | 2:2.2.18-1 | DEBIAN-CVE-2021-3281 |
| Debian:13 | python-django | 2:2.2.18-1 | DEBIAN-CVE-2021-3281 |
| Debian:14 | python-django | 2:2.2.18-1 | DEBIAN-CVE-2021-3281 |
| PyPI | django | 2.2.18, 3.0.12, 3.1.6 | PYSEC-2021-9 |
| PyPI | django | 3.0.12 | GHSA-fvgf-6h6h-3322 |
| PyPI | django | 3.1.6 | GHSA-fvgf-6h6h-3322 |
| PyPI | django | 2.2.18 | GHSA-fvgf-6h6h-3322 |
Affected products (as reported)
References
- https://groups.google.com/forum/#%21forum/django-announce x_refsource_MISC
- https://docs.djangoproject.com/en/3.1/releases/security/ x_refsource_MISC
- https://www.djangoproject.com/weblog/2021/feb/01/security-releases/ x_refsource_CONFIRM
- FEDORA-2021-5329c680f7 vendor-advisory, x_refsource_FEDORA
- https://security.netapp.com/advisory/ntap-20210226-0004/ x_refsource_CONFIRM