CVE-2019-11324: Urllib3 Improper Certificate Validation Vulnerability

HIGH
Advisory Identifier: GHSA-mh33-7rrq-662w
CVSS 7.5
CWE-295
Published
Advisory Summary

CVE-2019-11324 is a HIGH (CVSS 7.5) improper certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Urllib3 libraries in the PyPI ecosystem. The issue involves improper certificate validation in urllib3. Remediation is available by upgrading affected packages to version 1.24.2.

CVE-2019-11324 at a Glance

CVE Identifier CVE-2019-11324
GHSA Identifier GHSA-mh33-7rrq-662w
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Urllib3
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-11324

To remediate this vulnerability, upgrade all affected Urllib3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

urllib3 fixed: 1.24.2
pip install urllib3>=1.24.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show urllib3

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-11324, inspect your installed packages using pip:

pip show urllib3

Analyze the terminal output to locate any version of Urllib3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.24.2), your application is affected.

Note: The pip show urllib3 command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Urllib3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The urllib3 library before 1.24.2 for Python mishandles certain cases where the desired set of CA certificates is different from the OS store of CA certificates, which results in SSL connections succeeding in situations where a verification failure is the correct outcome. This is related to use of the `ssl_context`, `ca_certs`, or `ca_certs_dir` argument.

CVE-2019-11324 Affected Urllib3 Versions

1 component(s)
Fixed Versions:
1.24.2
Product / Package Ecosystem Affected Versions Fixed Version
urllib3
PyPI
< 1.24.2
1.24.2

References

NVD — CVE-2019-11324 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-11324
Security Fix Commit FIX COMMIT
https://github.com/urllib3/urllib3/commit/1efadf43dc63317cd9eaa3e0fdb9e05ab07254b1
access.redhat.com/errata/rhsa-2019:33... WEB
https://access.redhat.com/errata/RHSA-2019:3335
access.redhat.com/errata/rhsa-2019:35... WEB
https://access.redhat.com/errata/RHSA-2019:3590
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-mh33-7rrq-662w
Urllib3 Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2019-133.yaml
Urllib3 Source Repository REPOSITORY
https://github.com/urllib3/urllib3
Urllib3 Source Repository REPOSITORY
https://github.com/urllib3/urllib3/compare/a6ec68a...1efadf4
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/06/msg00015.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2023/10/msg00012.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NKGPJLVLVYCL4L4B4G5TIOTVK4BKPG72
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XOSA2NT4DUQDBEIWE6O7KKD24XND7TE2
pypi.org/project/urllib3/1.2... WEB
https://pypi.org/project/urllib3/1.24.2
usn.ubuntu.com/3990-1 WEB
https://usn.ubuntu.com/3990-1
Urllib3 Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00039.html
Urllib3 Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00041.html
Urllib3 Security Information SECURITY
http://www.openwall.com/lists/oss-security/2019/04/19/1

Frequently Asked Questions

What is CVE-2019-11324?
CVE-2019-11324 is a security vulnerability in Urllib3 involving Improper Certificate Validation in urllib3 under CWE-295: Improper Certificate Validation.
Which Urllib3 versions are affected?
Affected versions include releases prior to 1.24.2 across affected packages: urllib3.
What version fixes CVE-2019-11324?
Upgrading to 1.24.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is urllib3 affected?
Yes, urllib3 is affected in releases prior to 1.24.2. Upgrade your dependency to 1.24.2 or later.
What is the CVSS score of CVE-2019-11324?
CVE-2019-11324 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-11324?
CVE-2019-11324 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check PyPI dependencies for CVE-2019-11324?
Run the dependency tree command: 'pip show urllib3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mh33-7rrq-662w",
  "modified" : "2024-11-18T22:10:50Z",
  "published" : "2019-04-19T16:55:10Z",
  "aliases" : [ "CVE-2019-11324" ],
  "summary" : "Improper Certificate Validation in urllib3",
  "details" : "The urllib3 library before 1.24.2 for Python mishandles certain cases where the desired set of CA certificates is different from the OS store of CA certificates, which results in SSL connections succeeding in situations where a verification failure is the correct outcome. This is related to use of the `ssl_context`, `ca_certs`, or `ca_certs_dir` argument.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "urllib3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.24.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-11324"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/urllib3/urllib3/commit/1efadf43dc63317cd9eaa3e0fdb9e05ab07254b1"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3335"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3590"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-mh33-7rrq-662w"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2019-133.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/urllib3/urllib3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/urllib3/urllib3/compare/a6ec68a...1efadf4"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/06/msg00015.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/10/msg00012.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NKGPJLVLVYCL4L4B4G5TIOTVK4BKPG72"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XOSA2NT4DUQDBEIWE6O7KKD24XND7TE2"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/urllib3/1.24.2"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3990-1"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00039.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00041.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2019/04/19/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-04-19T16:54:21Z",
    "nvd_published_at" : "2019-04-18T21:29:00Z"
  }
}