CVE-2022-24840: Path Traversal in django-s3file

django-s3file Updated 02 Oct 2025

Summary

06/06/2022
Yes i
Critical
9.1

CVE-2022-24840: Path Traversal in django-s3file. Affects django-s3file versions < 5.5.1. Fixed in 5.5.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

django-s3file is a Python package available on PyPI that provides functionality for handling files stored in AWS S3 buckets within Django applications. It allows users to upload, retrieve, and manage files stored in S3. However, a vulnerability has been discovered in versions prior to 5.5.1 that allows for path traversal attacks, potentially leading to unauthorized access or deletion of files within the S3 bucket.

Vulnerability Detail

The path traversal vulnerability in django-s3file allows an attacker to traverse the entire AWS S3 bucket and perform destructive operations. By injecting malicious form data, an attacker can manipulate the file handling views and access or delete files within the bucket. The impact of this vulnerability can be significant, as it can lead to unauthorized access to sensitive files, deletion of important assets, or even code injection and remote code execution.

How To Fix

Latest published version: 7.2.0 as of 22 Oct 2026

pip install --upgrade "django-s3file==7.2.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.5.1

This is the first release that contains the fix.

pip install --upgrade "django-s3file==5.5.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no feasible workaround for this vulnerability. It is highly recommended to update to the patched version of django-s3file as soon as possible.

Conclusion

The path traversal vulnerability in django-s3file can have severe consequences, allowing unauthorized access, deletion of files, and even code injection. It is essential for users to update to version 5.5.1 or above to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for django-s3file →

Share this vulnerability

FAQ

The vulnerability allows an attacker to traverse the entire AWS S3 bucket and potentially access or delete files. It can also lead to code injection and remote code execution.

Yes, all versions prior to 5.5.1 are affected by this vulnerability. It is important to update to the patched version to mitigate the risk.

If all file handling views require authentication or special permission, the attack is limited to privileged users. However, if authentication is not enforced, any user can potentially exploit the vulnerability.

Yes, this vulnerability can be exploited remotely by sending a malicious request with manipulated form data.

There have been no reports of this vulnerability being known to or exploited by a third party before the release of the patch. However, it is crucial to update to the patched version to prevent any potential exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for django-s3file.

How To Fix

Latest published version: 7.2.0 as of 22 Oct 2026

pip install --upgrade "django-s3file==7.2.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.5.1

This is the first release that contains the fix.

pip install --upgrade "django-s3file==5.5.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback