Bug 2295937 (CVE-2024-39330)

Summary: CVE-2024-39330 python-django: Potential directory-traversal in django.core.files.storage.Storage.save()
Product: [Other] Security Response Reporter: TEJ RATHI <trathi>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: adudiak, brking, caswilli, cmoore, davidn, eglynn, epacific, gmccullo, gtanzill, haoli, hkataria, jcammara, jhardy, jjoyce, jmitchel, jneedle, jobarker, jschluet, jtanner, jweng, kaycoth, kholdawa, kshier, lhh, lphiri, lsvaty, mabashia, mburns, mgarciac, mminar, omaciel, pgrist, rbiba, rbobbitt, security-response-team, simaishi, smcdonal, sskracic, stcannon, teagle, tfister, yguenane, zsadeh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in Python-Django in the Derived classes of the django.core.files.storage.Storage base class that overrides the generate_filename() without replicating the file path validations existing in the parent class. This flaw allows potential directory traversal via certain inputs when calling save(). Built-in Storage sub-classes were not affected by this vulnerability.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2296441, 2296444, 2296445, 2296442, 2296443, 2296447, 2296449    
Bug Blocks:    

Description TEJ RATHI 2024-07-05 09:58:22 UTC
Derived classes of the django.core.files.storage.Storage base class which override generate_filename() without replicating the file path validations existing in the parent class, allow for potential directory-traversal via certain inputs when calling save(). Built-in Storage sub-classes were not affected by this vulnerability.

Affected versions
=================

* Django main development branch
* Django 5.1 
* Django 5.0
* Django 4.2

Comment 2 errata-xmlrpc 2024-09-05 14:09:54 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.4 for RHEL 9
  Red Hat Ansible Automation Platform 2.4 for RHEL 8

Via RHSA-2024:6428 https://access.redhat.com/errata/RHSA-2024:6428

Comment 3 errata-xmlrpc 2024-11-05 17:24:55 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.16 for RHEL 8
  Red Hat Satellite 6.16 for RHEL 9

Via RHSA-2024:8906 https://access.redhat.com/errata/RHSA-2024:8906

Comment 4 errata-xmlrpc 2024-11-13 13:17:58 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Services on OpenShift 18.0

Via RHSA-2024:9481 https://access.redhat.com/errata/RHSA-2024:9481