CVE-2026-42196: Django s3file Path Traversal Vulnerability
CRITICALCVE-2026-42196 is a CRITICAL path traversal vulnerability (CWE-26: Path Traversal: '/dir/../filename') affecting Django s3file libraries in the PyPI ecosystem. The issue involves django-s3file is vulnerable to relative path traversal. Remediation is available by upgrading affected packages to version 7.0.2.
CVE-2026-42196 at a Glance
How to Fix CVE-2026-42196
To remediate this vulnerability, upgrade all affected Django s3file dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install django-s3file>=7.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show django-s3file
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-42196, inspect your installed packages using pip:
pip show django-s3file
Analyze the terminal output to locate any version of Django s3file in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.2), your application is affected.
Note: The pip show django-s3file command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-26: Path Traversal: '/dir/../filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "/dir/../filename" sequences that can resolve to a location that is outside of that directory. In Django s3file, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-42196 Affected Django s3file Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
django-s3file
|
PyPI |
< 7.0.2
|
7.0.2
|
References
Frequently Asked Questions
What is CVE-2026-42196?
Which Django s3file versions are affected?
What version fixes CVE-2026-42196?
Is django-s3file affected?
What CWE is associated with CVE-2026-42196?
How can I check PyPI dependencies for CVE-2026-42196?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-67qg-7284-2277",
"modified" : "2026-05-13T16:31:46Z",
"published" : "2026-05-05T20:05:49Z",
"aliases" : [ "CVE-2026-42196" ],
"summary" : "django-s3file is vulnerable to relative path traversal",
"details" : "### Impact\n`S3FileMiddleware` is vulnerable to relative path traversal attacks, where an attacker can use a modified request to escape pre-signed upload locations and have the Django application load files from random locations into `request.FILES`\n\nDepending on how files are handled, this may lead to confidentiality and integrity issues.\n\n### Patches\nDjango-S3File urges all users to update to a patched version >=7.0.2.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "django-s3file"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.0.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/codingjoe/django-s3file/security/advisories/GHSA-67qg-7284-2277"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42196"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/codingjoe/django-s3file"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-23", "CWE-26" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T20:05:49Z",
"nvd_published_at" : "2026-05-12T22:16:34Z"
}
}