GHSA-pcjh-6r5h-r92r: Django sendfile2 Django-sendfile2 Before 0.7.0 Contains Reflected Vulnerability
HIGHGHSA-pcjh-6r5h-r92r is a HIGH django-sendfile2 before 0.7.0 contains reflected vulnerability (CWE-20: Improper Input Validation) affecting Django sendfile2 libraries in the PyPI ecosystem. The issue involves django-sendfile2 before 0.7.0 contains reflected file download vulnerability. Remediation is available by upgrading affected packages to version 0.7.0.
GHSA-pcjh-6r5h-r92r at a Glance
How to Fix GHSA-pcjh-6r5h-r92r
To remediate this vulnerability, upgrade all affected Django sendfile2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install django-sendfile2>=0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show django-sendfile2
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-pcjh-6r5h-r92r, inspect your installed packages using pip:
pip show django-sendfile2
Analyze the terminal output to locate any version of Django sendfile2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: The pip show django-sendfile2 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Django sendfile2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-pcjh-6r5h-r92r Affected Django sendfile2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
django-sendfile2
|
PyPI |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is GHSA-pcjh-6r5h-r92r?
Which Django sendfile2 versions are affected?
What version fixes GHSA-pcjh-6r5h-r92r?
Is django-sendfile2 affected?
What CWE is associated with GHSA-pcjh-6r5h-r92r?
How can I check PyPI dependencies for GHSA-pcjh-6r5h-r92r?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pcjh-6r5h-r92r",
"modified" : "2022-08-11T18:12:35Z",
"published" : "2022-08-11T18:12:35Z",
"aliases" : [ ],
"summary" : "django-sendfile2 before 0.7.0 contains reflected file download vulnerability",
"details" : "Similar to CVE-2022-36359 for Django, django-sendfile2 did not protect against a reflected file download attack in version 0.6.1 and earlier. If the file name used by django-sendfile2 was derived from user input, then it would be possible to perform a such an attack. A new version of django-sendfile2 will be released. Either download django-sendfile2 0.7.0 as a workaround or sanitize user input yourself, using Django's patch as a template: https://github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "django-sendfile2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moggers87/django-sendfile2/security/advisories/GHSA-pcjh-6r5h-r92r"
}, {
"type" : "WEB",
"url" : "https://github.com/moggers87/django-sendfile2/commit/4c370859023292e3715200a57843f86c5ef3cd77"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moggers87/django-sendfile2"
}, {
"type" : "WEB",
"url" : "https://github.com/moggers87/django-sendfile2/releases/tag/v0.7.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-08-11T18:12:35Z",
"nvd_published_at" : null
}
}