CVE-2022-24840
Python vulnerability analysis and mitigation

Overview

CVE-2022-24840 affects django-s3file, a lightweight file upload input for Django and Amazon S3, in versions prior to 5.5.1. The vulnerability allowed attackers to traverse the entire AWS S3 bucket and 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, with no reports of exploitation prior to the patch release (GitHub Advisory).

Technical details

The vulnerability is classified as a Path Traversal issue (CWE-22) with a CVSS v3.1 base score of 9.8 CRITICAL (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The issue stems from improper path validation in the file handling middleware, allowing attackers to manipulate form data to access arbitrary files within the S3 bucket. An attacker could exploit this by sending a POST request with specially crafted form data to any path on the target application (GitHub Advisory, NVD).

Impact

The vulnerability could lead to unauthorized access to files within the AWS S3 bucket, potential file deletion, and information disclosure. Attackers could perform file deletion by moving files to unknown locations, retrieve sensitive files by moving them to public locations, and perform tree traversal to discover additional files. The impact was particularly severe as the vulnerability could be exploited through any form view (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 5.5.1 and above. There are no feasible workarounds, and users are strongly urged to update to the patched version immediately. If authentication is required for all file handling views, the threat is limited to privileged users (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22871HIGH8.7
  • PythonPython
  • guarddog
NoYesJan 13, 2026
GHSA-58pv-8j8x-9vj2HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 13, 2026
CVE-2026-22779MEDIUM6.3
  • PythonPython
  • blacksheep
NoYesJan 14, 2026
CVE-2026-21889LOW2.3
  • PythonPython
  • weblate
NoYesJan 14, 2026
CVE-2025-68492LOW2.3
  • PythonPython
  • chainlit
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management