GHSA-pcjh-6r5h-r92r django-sendfile2 before 0.7.0 contains reflected file download vulnerability

Not scored Published

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.

PackageAffectedFixed in
django-sendfile2 PyPIAll versions0.7.0
django-sendfile2 PyPIAll versions0.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.

Sources

Is GHSA-pcjh-6r5h-r92r in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free