CVE-2026-24034: Django Os Path Join Traversal

Using os.path.join() with user-controlled input allows path traversal. Attackers can supply '../' sequences to escape the intended directory. Use django.utils._os.safe_join() instead, which validates that the resulting path is strictly within the expected base directory.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-24034-django-os-path-join-traversal --engine opengrep

Description

Using os.path.join() with user-controlled input allows path traversal. Attackers can supply '../' sequences to escape the intended directory. Use django.utils._os.safe_join() instead, which validates that the resulting path is strictly within the expected base directory.