CVE-2021-3281: Path Traversal

Published Jan 25, 2021
·
Updated

A flaw was found in django where thedjango.utils.archive.extract() function, used by startapp --template and startproject --template, allowed directory-traversal via an archive with absolute paths or relative paths with dot segments.

Other sources

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.

The django.utils.archive.extract() function, used by startapp --template and startproject --template, allowed directory-traversal via an archive with absolute paths or relative paths with dot segments.

Red Hat

Affected Software

26 affected componentsFixes available
redhat/automation-hub<0:4.2.2-1.el7
0:4.2.2-1.el7
redhat/python3-django<0:2.2.18-1.el7
0:2.2.18-1.el7
redhat/python-bleach<0:3.3.0-1.el7
0:3.3.0-1.el7
redhat/python-bleach-allowlist<0:1.0.3-1.el7
0:1.0.3-1.el7
redhat/python-galaxy-importer<0:0.2.15-1.el7
0:0.2.15-1.el7
redhat/python-galaxy-ng<0:4.2.2-1.el7
0:4.2.2-1.el7
redhat/python-pulp-ansible<1:0.5.6-1.el7
1:0.5.6-1.el7
redhat/automation-hub<0:4.2.2-1.el8
0:4.2.2-1.el8
redhat/python3-django<0:2.2.18-1.el8
0:2.2.18-1.el8
redhat/python-bleach<0:3.3.0-1.el8
0:3.3.0-1.el8
redhat/python-bleach-allowlist<0:1.0.3-1.el8
0:1.0.3-1.el8
redhat/python-galaxy-importer<0:0.2.15-1.el8
0:0.2.15-1.el8
redhat/python-galaxy-ng<0:4.2.2-1.el8
0:4.2.2-1.el8
redhat/python-pulp-ansible<1:0.5.6-1.el8
1:0.5.6-1.el8
redhat/python-django20<0:2.0.13-16.el8
0:2.0.13-16.el8
redhat/Django<2.2.18
2.2.18
redhat/Django<3.0.12
3.0.12
redhat/Django<3.1.6
3.1.6
pip/django>=3.0<3.0.12
3.0.12
pip/django>=3.1<3.1.6
3.1.6
pip/django>=2.2<2.2.18
2.2.18
djangoproject Django>=2.2<2.2.18
djangoproject Django>=3.0<3.0.12
djangoproject Django>=3.1<3.1.6
Fedoraproject Fedora=33
NetApp Snapcenter

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/automation-hub to a version that resolves this vulnerability.

    Fixed in 0:4.2.2-1.el7
  2. Upgrade

    Upgrade redhat/python3-django to a version that resolves this vulnerability.

    Fixed in 0:2.2.18-1.el7
  3. Upgrade

    Upgrade redhat/python-bleach to a version that resolves this vulnerability.

    Fixed in 0:3.3.0-1.el7
  4. Upgrade

    Upgrade redhat/python-bleach-allowlist to a version that resolves this vulnerability.

    Fixed in 0:1.0.3-1.el7
  5. Upgrade

    Upgrade redhat/python-galaxy-importer to a version that resolves this vulnerability.

    Fixed in 0:0.2.15-1.el7
  6. Upgrade

    Upgrade redhat/python-galaxy-ng to a version that resolves this vulnerability.

    Fixed in 0:4.2.2-1.el7
  7. Upgrade

    Upgrade redhat/python-pulp-ansible to a version that resolves this vulnerability.

    Fixed in 1:0.5.6-1.el7
  8. Upgrade

    Upgrade redhat/automation-hub to a version that resolves this vulnerability.

    Fixed in 0:4.2.2-1.el8
  9. Upgrade

    Upgrade redhat/python3-django to a version that resolves this vulnerability.

    Fixed in 0:2.2.18-1.el8
  10. Upgrade

    Upgrade redhat/python-bleach to a version that resolves this vulnerability.

    Fixed in 0:3.3.0-1.el8
  11. Upgrade

    Upgrade redhat/python-bleach-allowlist to a version that resolves this vulnerability.

    Fixed in 0:1.0.3-1.el8
  12. Upgrade

    Upgrade redhat/python-galaxy-importer to a version that resolves this vulnerability.

    Fixed in 0:0.2.15-1.el8
  13. Upgrade

    Upgrade redhat/python-galaxy-ng to a version that resolves this vulnerability.

    Fixed in 0:4.2.2-1.el8
  14. Upgrade

    Upgrade redhat/python-pulp-ansible to a version that resolves this vulnerability.

    Fixed in 1:0.5.6-1.el8
  15. Upgrade

    Upgrade redhat/python-django20 to a version that resolves this vulnerability.

    Fixed in 0:2.0.13-16.el8
  16. Upgrade

    Upgrade redhat/Django to a version that resolves this vulnerability.

    Fixed in 2.2.18
  17. Upgrade

    Upgrade redhat/Django to a version that resolves this vulnerability.

    Fixed in 3.0.12
  18. Upgrade

    Upgrade redhat/Django to a version that resolves this vulnerability.

    Fixed in 3.1.6
  19. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 3.0.12
  20. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 3.1.6
  21. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 2.2.18

Event History

Feb 1, 2021
CVE Published
10:00 AM
Feb 2, 2021
CVE Published
via MITRE·06:16 AM
Data Sourced
via MITRE·06:16 AM
Description
Data Sourced
via NVD·07:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 18, 2021
Advisory Published
08:29 PM

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2021-3281.

2

What is the severity of CVE-2021-3281?

The severity of CVE-2021-3281 is medium with a severity value of 5.3.

3

What is the affected software?

The affected software is Django versions 2.2 before 2.2.18, 3.0 before 3.0.12, and 3.1 before 3.1.6.

4

How can this vulnerability be exploited?

This vulnerability can be exploited through a directory traversal attack using an archive with absolute paths or relative paths with dot segments.

5

Where can I find more information about CVE-2021-3281?

You can find more information about CVE-2021-3281 in the following references: [link1], [link2], [link3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203