Advisory

GHSA-fvgf-6h6h-3322

Also known as: BIT-django-2021-3281, CVE-2021-3281, PYSEC-2021-9

Summary

Django Directory Traversal via archive.extract

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-03-18 20:29 UTC
Modified
2024-09-20 15:46 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 2.2, fixed 2.2.18 (ecosystem)

Fixed versions

2.2.18

Fix

  • Fixed version 2.2.18
    pip install --upgrade django==2.2.18

django

PyPI · All systems

Affected

  • introduced 3.1, fixed 3.1.6 (ecosystem)

Fixed versions

3.1.6

Fix

  • Fixed version 3.1.6
    pip install --upgrade django==3.1.6

django

PyPI · All systems

Affected

  • introduced 3.0, fixed 3.0.12 (ecosystem)

Fixed versions

3.0.12

Fix

  • Fixed version 3.0.12
    pip install --upgrade django==3.0.12

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences