CyberSecBulletin
CVE-2022-36359NVD status: Modified

Django: Download of Code Without Integrity Check

CVE-2022-36359 is a high-severity download of code without integrity check vulnerability in Django, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists versions 3.2.15, 4.0.7 as the first without the flaw, so updating Django to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.94% chance of exploitation within 30 days, higher than 61% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Django to 3.2.15 or 4.0.7, whichever matches your release line, or a later version.
  2. Read the advisory on docs.djangoproject.com for workarounds and exact fixed builds.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
  4. Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.

Affected products and versions

VendorProductAffected versionsFixed in
DjangoDjango3.2 up to, but not including, 3.2.15; 4.0 up to, but not including, 4.0.73.2.15, 4.0.7
DebianDebian Linux11.0Not stated

Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
RequiredA user must take an action such as opening a file or link.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.

Official description

An issue was discovered in the HTTP FileResponse class in Django 3.2 before 3.2.15 and 4.0 before 4.0.7. An application is vulnerable to a reflected file download (RFD) attack that sets the Content-Disposition header of a FileResponse when the filename is derived from user-supplied input.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Download of Code Without Integrity Check

The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.

How developers prevent this class of flaw

  • Perform proper forward and reverse DNS lookups to detect DNS spoofing.
  • Encrypt the code with a reliable encryption scheme before transmitting.
  • Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

More Download of Code Without Integrity Check vulnerabilities (CWE-494)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Third-party and government advisories

Other vulnerabilities in Django

All Django vulnerabilities

Recent Download of Code Without Integrity Check vulnerabilities

Spotted an error? Tell us.