CVE-2025-49143: Django Unauthenticated Serve Routing

Directly routing to Django's `serve` view exposes files without access control. This allows unauthenticated users to read arbitrary files within the document root. Enforce authentication by wrapping `django.views.static.serve` in a custom view, or restrict this route to development environments only using `if settings.DEBUG:`.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2025-49143-django-unauthenticated-serve-routing --engine opengrep

Description

Directly routing to Django's `serve` view exposes files without access control. This allows unauthenticated users to read arbitrary files within the document root. Enforce authentication by wrapping `django.views.static.serve` in a custom view, or restrict this route to development environments only using `if settings.DEBUG:`.