{"id":"PYSEC-2024-58","details":"An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14. Derived classes of the django.core.files.storage.Storage base class, when they override generate_filename() without replicating the file-path validations from the parent class, potentially allow directory traversal via certain inputs during a save() call. (Built-in Storage sub-classes are unaffected.)","aliases":["BIT-django-2024-39330","CVE-2024-39330","GHSA-9jmf-237g-qf46"],"modified":"2025-03-10T09:27:30.416627Z","published":"2024-07-10T05:15:00Z","references":[{"type":"WEB","url":"https://docs.djangoproject.com/en/dev/releases/security/"},{"type":"WEB","url":"https://groups.google.com/forum/#%21forum/django-announce"},{"type":"ARTICLE","url":"https://www.djangoproject.com/weblog/2024/jul/09/security-releases/"}],"affected":[{"package":{"name":"django","ecosystem":"PyPI","purl":"pkg:pypi/django"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0"},{"fixed":"5.0.7"},{"introduced":"4.2"},{"fixed":"4.2.14"}]}],"versions":["4.2","4.2.1","4.2.10","4.2.11","4.2.12","4.2.13","4.2.2","4.2.3","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.2.9","5.0","5.0.1","5.0.2","5.0.3","5.0.4","5.0.5","5.0.6"],"database_specific":{"source":"https://github.com/pypa/advisory-database/blob/main/vulns/django/PYSEC-2024-58.yaml"}}],"schema_version":"1.7.3"}