Vulnerability in Django: Incorrect Filesystem Cache Permissions

py-django Updated 02 Oct 2025

Summary

01/09/2020
N/A
Yes i
High
7.5

CVE-2020-24584: An issue was discovered in Django 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). Affects py-django across 2 version ranges.

< 1.11.29-r1 >= 635d53a86a36cde7866b9caefeb64d809e6bfcd9, < bf07047f45767eddaf52400c60f7e2becc8891d3

Fixed in 1.11.29-r1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Django is a popular web framework written in Python that enables developers to build web applications quickly and efficiently. It provides a wide range of features and tools for handling various aspects of web development. However, a vulnerability has been discovered in Django versions 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). This vulnerability affects the intermediate-level directories of the filesystem cache, which have incorrect permissions. Instead of having the appropriate permissions set, they inherit the system's standard umask.

Vulnerability Detail

The vulnerability (CVE-2020-24584) in Django allows an attacker to access sensitive information stored in the filesystem cache. By exploiting the incorrect permissions, an attacker can potentially read or modify cached data that should be protected. This could lead to unauthorized access, data leakage, or even the execution of arbitrary code. The vulnerability primarily affects Django applications running on systems with Python 3.7 or higher.

How To Fix

Minimum fixed version

1.11.29-r1

This is the first release that contains the fix.

sudo apk add --upgrade py-django

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

Workaround

If upgrading Django is not immediately feasible, a temporary workaround can be implemented by manually setting the correct permissions for the intermediate-level directories of the filesystem cache. This can be done by modifying the umask value in the Django settings file to 0o077. However, this workaround should only be considered as a temporary solution, and upgrading to the fixed versions of Django is strongly recommended.

Conclusion

The vulnerability in Django's filesystem cache permissions can lead to unauthorized access and data leakage. It is crucial to upgrade to the fixed versions of Django (2.2.16, 3.0.10, or 3.1.1) to mitigate this vulnerability. If immediate upgrade is not possible, applying the temporary workaround of manually setting the correct permissions is recommended. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for py-django →

Share this vulnerability

FAQ

This vulnerability allows an attacker to access sensitive information stored in the filesystem cache, potentially leading to unauthorized access, data leakage, or arbitrary code execution.

Django versions 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used) are affected by this vulnerability.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to apply the necessary fixes to prevent any potential exploitation.

A temporary workaround is available by manually setting the correct permissions for the filesystem cache directories. However, upgrading to the fixed versions of Django is the recommended long-term solution.

More information about this vulnerability can be found in the official CVE-2020-24584 advisory and the Django project's security announcements.

Related vulnerabilities

Recent vulnerabilities recorded for py-django.

How To Fix

Minimum fixed version

1.11.29-r1

This is the first release that contains the fix.

sudo apk add --upgrade py-django

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