# CVE-2022-24840: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in django-s3file

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.07%, higher than 81% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-06-06T19:10:11.000Z
- Modified: 2026-06-17T04:32:38.133Z
- Also known as: GHSA-4w8f-hjm9-xwgf, PYSEC-2022-208
- Weaknesses: CWE-22, CWE-96
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

django-s3file is a lightweight file upload input for Django and Amazon S3 . In versions prior to 5.5.1 it was possible to traverse the entire AWS S3 bucket and in most cases to access or delete files. If the `AWS_LOCATION` setting was set, traversal was limited to that location only. The issue was discovered by the maintainer. There were no reports of the vulnerability being known to or exploited by a third party, prior to the release of the patch. The vulnerability has been fixed in version 5.5.1 and above. There is no feasible workaround. We must urge all users to immediately updated to a patched version.

(As written by CVE List.)

## Affected

- codingjoe django-s3file: < 5.5.1
- django-s3file (PyPI): before 5.5.1; before 68ccd2c621a40eb66fdd6af2be9d5fcc9c373318
- django-s3file_project django-s3file: before 5.5.1

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/codingjoe/django-s3file/security/advisories/GHSA-4w8f-hjm9-xwgf> (exploit, advisory, third-party-advisory, web)
- <https://github.com/codingjoe/django-s3file/commit/68ccd2c621a40eb66fdd6af2be9d5fcc9c373318> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24840> (advisory)
- <https://github.com/codingjoe/django-s3file> (package)
- <https://github.com/codingjoe/django-s3file/releases/tag/5.5.1> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/django-s3file/PYSEC-2022-208.yaml> (web)

## Sources

- CVE List: [CVE-2022-24840](https://www.cve.org/CVERecord?id=CVE-2022-24840), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-4w8f-hjm9-xwgf](https://github.com/advisories/GHSA-4w8f-hjm9-xwgf), CC-BY-4.0, modified 2025-02-17
- NVD: [CVE-2022-24840](https://nvd.nist.gov/vuln/detail/CVE-2022-24840), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-208](https://osv.dev/vulnerability/PYSEC-2022-208), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-24840 · Whole record: https://cve.day/CVE-2022-24840.json · Rebuilt by cve.day 2026-11-25T22:58:12.180Z
