Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in django-s3file
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-24840
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 15:52 UTC · Revision 1
Source evidence
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in django-s3file
core-osv · Original sourcePublished 6 Jun 2022, 19:10 UTC
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.
osv:CVE-2022-24840
Complete source record
{
"id": "5ea6ba5c9ffdf72896a2dc55ad061dc6eb7e89457aca40537a49ad8735418041",
"url": "https://osv.dev/vulnerability/CVE-2022-24840",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in django-s3file",
"summary": "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.",
"evidence": "osv:CVE-2022-24840",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2022-24840",
"aliases": [
"CVE-2022-24840",
"GHSA-4w8f-hjm9-xwgf",
"PYSEC-2022-208"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/codingjoe/django-s3file",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "d3d3dbcd3cc7cd869bdbc676dce8ce5da0d11b09"
},
{
"fixed": "68ccd2c621a40eb66fdd6af2be9d5fcc9c373318"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:django-s3file_project:django-s3file:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "5.5.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "68ccd2c621a40eb66fdd6af2be9d5fcc9c373318"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"5.5.0",
"5.4.0",
"5.3.0",
"5.2.0",
"5.1.3",
"5.1.2",
"5.1.1",
"5.1.0",
"5.0.6",
"5.0.5",
"5.0.4",
"5.0.3",
"5.0.2",
"5.0.1",
"5.0.0",
"4.2.0",
"4.1.0",
"4.0.2",
"4.0.1",
"4.0.0",
"3.0.5",
"3.0.4",
"3.0.3",
"3.0.2",
"3.0.1",
"3.0.0",
"2.0.0",
"1.2.1",
"1.2.0",
"1.1.0",
"1.0.2",
"1.0.1",
"1.0.0",
"0.6.0",
"0.5.4",
"0.5.3",
"0.5.2",
"0.5.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24840.json"
}
}
],
"modified": "2026-10-28T02:30:30.301836257Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24840.json",
"https://github.com/codingjoe/django-s3file/security/advisories/GHSA-4w8f-hjm9-xwgf",
"https://nvd.nist.gov/vuln/detail/CVE-2022-24840",
"https://github.com/codingjoe/django-s3file/commit/68ccd2c621a40eb66fdd6af2be9d5fcc9c373318"
],
"provider_metadata": {
"cwe_ids": [
"CWE-22"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24840.json"
}
},
"related_cves": [
{
"value": "CVE-2022-24840",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497027,
"published_at": "2022-06-06T19:10:11+00:00"
}