GHSA-pcjh-6r5h-r92r django-sendfile2 before 0.7.0 contains reflected file download vulnerability
Not scored
Published
Check this codebase for GHSA-pcjh-6r5h-r92r and fix it if it is affected.
What it is: GHSA-pcjh-6r5h-r92r is a vulnerability in django-sendfile2, published on 11 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-pcjh-6r5h-r92r in the wild and no public exploit code.
Affected packages and fixed versions:
- django-sendfile2 (PyPI): affected all versions; fixed in 0.7.0
- django-sendfile2 (PyPI): affected all versions; fixed in 0.7.0
Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.
Reference: https://insights.sbomify.com/GHSA-pcjh-6r5h-r92r/ (Markdown: https://insights.sbomify.com/GHSA-pcjh-6r5h-r92r/index.md)
Attackers can trick users into downloading malicious files via reflected file download if filenames derive from user input, affecting django-sendfile2 users.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-pcjh-6r5h-r92r?
GHSA-pcjh-6r5h-r92r is a vulnerability in django-sendfile2, published on 11 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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
Which versions are affected by GHSA-pcjh-6r5h-r92r?
2 open source packages ship an affected version, including django-sendfile2.
| Package | Affected | Fixed in |
|---|---|---|
django-sendfile2 PyPI | All versions | 0.7.0 |
django-sendfile2 PyPI | All versions | 0.7.0 |
How do I fix GHSA-pcjh-6r5h-r92r?
Upgrade django-sendfile2 to 0.7.0 or later.
Is GHSA-pcjh-6r5h-r92r being exploited?
There is no known exploitation of GHSA-pcjh-6r5h-r92r in the wild and no public exploit code.