Advisory

GHSA-68w8-qjq3-2gfm

Also known as: BIT-django-2021-33203, CVE-2021-33203, PYSEC-2021-98

Summary

Path Traversal in Django

Details

Django before 2.2.24, 3.x before 3.1.12, and 3.2.x before 3.2.4 has a potential directory traversal via django.contrib.admindocs. Staff members could use the TemplateDetailView view to check the existence of arbitrary files. Additionally, if (and only if) the default admindocs templates have been customized by application developers to also show file contents, then not only the existence but also the file contents would have been exposed. In other words, there is directory traversal outside of the template root directories.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-06-10 17:21 UTC
Modified
2024-09-20 15:46 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 0, fixed 2.2.24 (ecosystem)

Fixed versions

2.2.24

Fix

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

django

PyPI · All systems

Affected

  • introduced 3.0, fixed 3.1.12 (ecosystem)

Fixed versions

3.1.12

Fix

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

django

PyPI · All systems

Affected

  • introduced 3.2, fixed 3.2.4 (ecosystem)

Fixed versions

3.2.4

Fix

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

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