What’s Vulnerable › Vulnerabilities
GHSA-6r3c-8xf3-ggrr: Directory traversal outside of SENDFILE_ROOT in django-sendfile2
- Severity: medium (CVSS 5.5)
- Exploited in the wild: not listed in CISA KEV
- Public exploit or detection template: none known
- Published: 2020-06-24 · updated 2024-12-02
- Weakness: CWE-22
Description
django-sendfile2 currently relies on the backend to correctly limit file paths to `SENDFILE_ROOT`. This is not the case for the `simple` and `development` backends, it is also not necessarily the case for any of the other backends either (it's just an assumption that was made by the original author). This will be fixed in 0.6.0 which is to be released the same day as this advisory is made public. When upgrading, you will need to make sure `SENDFILE_ROOT` is set in your settings module if it wasn't already.
Affected products
- Pypi Django-Sendfile2: before 0.6.0; 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.1 — fixed in 0.6.0
How to fix
Upgrade to a fixed version: Pypi Django-Sendfile2 0.6.0. Check the vendor advisory for mitigations.
References
- https://github.com/moggers87/django-sendfile2/security/advisories/GHSA-6r3c-8xf3-ggrr
- https://github.com/moggers87/django-sendfile2/commit/f870c52398a55b9b5189932dd8caa24efb4bc1e1
- https://github.com/moggers87/django-sendfile2
Get alerted when GHSA-6r3c-8xf3-ggrr or the next vulnerability affects your stack