CVE-2026-42196 django-s3file: Relative path traversal

Critical 9.9 Published Updated

Attackers can exploit relative path traversal in django-s3file to load arbitrary files into request context, potentially compromising data confidentiality and integrity.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-42196?

CVE-2026-42196 is a critical path traversal vulnerability in codingjoe django-s3file, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

django-s3file is a lightweight file upload input for Django and Amazon S3. Prior to 7.0.2, 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. Depending on how files are handled, this may lead to confidentiality and integrity issues. This vulnerability is fixed in 7.0.2.

Weakness: CWE-26, CWE-22

Which versions are affected by CVE-2026-42196?

3 open source packages ship an affected version, including django-s3file.

PackageAffectedFixed in
django-s3file PyPIAll versions7.0.2
django-s3file PyPIAll versions7.0.2
django-s3file PyPIAll versions7.0.2

How do I fix CVE-2026-42196?

Upgrade django-s3file to 7.0.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-42196 being exploited?

There is no known exploitation of CVE-2026-42196 in the wild and no public exploit code.

Sources

Also known as GHSA-67qg-7284-2277, PYSEC-2026-328.

Is CVE-2026-42196 in your software?

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

Check your SBOMs for free