CVE-2019-12781 Django Incorrect HTTP detection with reverse-proxy connecting via HTTPS

Medium 5.3 Published Updated

Attackers can bypass HTTPS redirection when specific proxy settings are enabled, allowing HTTP traffic to remain unencrypted.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-12781?

CVE-2019-12781 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 1 Jul 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in Django 1.11 before 1.11.22, 2.1 before 2.1.10, and 2.2 before 2.2.3. An HTTP request is not redirected to HTTPS when the SECURE_PROXY_SSL_HEADER and SECURE_SSL_REDIRECT settings are used, and the proxy connects to Django via HTTPS. In other words, django.http.HttpRequest.scheme has incorrect behavior when a client uses HTTP.

Weakness: CWE-319

Which versions are affected by CVE-2019-12781?

7 open source packages ship an affected version, including django and Django. It affects 3 products.

PackageAffectedFixed in
django PyPIFrom 1.111.11.22
django PyPIFrom 2.12.1.10, 2.2.3, 1.11.22
django PyPIFrom 2.12.1.10
django PyPIFrom 2.22.2.3
Django PyPIFrom 1.111.11.22
Django PyPIFrom 2.12.1.10
1 more packages
Django PyPIFrom 2.22.2.3
Linux distribution packages (1)
python-Django SUSE:OpenStack Cloud 7All versions1.8.19-3.18.1

Products include Canonical Ubuntu Linux, Debian Debian Linux, Djangoproject Django.

How do I fix CVE-2019-12781?

Upgrade django to a fixed version for your release line: 1.11.22, 2.1.10 or 2.2.3.

Is CVE-2019-12781 being exploited?

There is no known exploitation of CVE-2019-12781 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2019-12781, DEBIAN-CVE-2019-12781, DLA-1842-1, GHSA-6c7v-2f49-8h26, PYSEC-2019-10, SUSE-SU-2019:2379-1 and 1 more.

Is CVE-2019-12781 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free