CVE-2020-24584: Django Filesystem Cache Umask Vulnerability

django Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

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 django across 3 version ranges.

>= 2.2.0, < 2.2.16 >= 3.0.0, < 3.0.10 >= 3.1.0, < 3.1.1

Fixed in 2.2.16, 3.0.10 or 3.1.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2020-24584 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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 is a popular open-source web framework written in Python. It provides a set of tools and libraries for building web applications quickly and efficiently. The filesystem cache is a feature in Django that allows temporary storage of rendered templates and other processed data to improve performance. This vulnerability affects 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.

Vulnerability Detail

The vulnerability arises from the fact that the intermediate-level directories of the filesystem cache in affected Django versions have the system's standard umask rather than 0o077. This means that the permissions set on these directories may be more permissive than intended, potentially allowing unauthorized access to sensitive cached data. An attacker with access to the filesystem cache could read or modify cached data belonging to other users or applications, leading to information disclosure or even remote code execution.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.2.0, < 2.2.16 2.2.16
  • >= 3.0.0, < 3.0.10 3.0.10
  • >= 3.1.0, < 3.1.1 3.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading Django is not immediately feasible, a temporary workaround can be implemented by manually setting the umask to 0o077 before starting the Django server. This can be achieved by adding the following line of code to the server startup script:

import os os.umask(0o077)

Conclusion

In conclusion, the Django Filesystem Cache Umask Vulnerability (CVE-2020-24584) affects certain versions of Django and can potentially lead to unauthorized access and information disclosure. It is crucial to upgrade to the fixed versions or apply the provided workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for django →

Share this vulnerability

FAQ

The vulnerability allows unauthorized access to sensitive cached data, potentially leading to information disclosure or remote 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.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the tool will provide real-time alerts for open-source vulnerabilities.

Yes, upgrading Django to version 2.2.16, 3.0.10, or 3.1.1 will fix this vulnerability.

Yes, a temporary workaround is to manually set the umask to 0o077 before starting the Django server.

Related vulnerabilities

Recent vulnerabilities recorded for django.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.2.0, < 2.2.16 2.2.16
  • >= 3.0.0, < 3.0.10 3.0.10
  • >= 3.1.0, < 3.1.1 3.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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