CVE-2016-7036: Python jose Python-jose Failure To Use A Vulnerability

CRITICAL
Advisory Identifier: GHSA-w799-prg3-cx77
CVSS 9.8
CWE-208
Published
Advisory Summary

CVE-2016-7036 is a CRITICAL (CVSS 9.8) python-jose failure to use a vulnerability (CWE-208: Observable Timing Discrepancy) affecting Python jose libraries in the PyPI ecosystem. The issue involves python-jose failure to use a constant time comparison for hmac keys. Remediation is available by upgrading affected packages to version 1.3.2.

CVE-2016-7036 at a Glance

CVE Identifier CVE-2016-7036
GHSA Identifier GHSA-w799-prg3-cx77
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product Python jose
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2016-7036

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

python-jose fixed: 1.3.2
pip install python-jose>=1.3.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 python-jose

How to Check if You Are Affected

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

pip show python-jose

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Python jose, 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

python-jose before 1.3.2 allows attackers to have unspecified impact by leveraging failure to use a constant time comparison for HMAC keys.

CVE-2016-7036 Affected Python jose Versions

1 component(s)
Fixed Versions:
1.3.2
Product / Package Ecosystem Affected Versions Fixed Version
python-jose
PyPI
< 1.3.2
1.3.2

References

Frequently Asked Questions

What is CVE-2016-7036?
CVE-2016-7036 is a security vulnerability in Python jose involving python-jose failure to use a constant time comparison for HMAC keys under CWE-208: Observable Timing Discrepancy.
Which Python jose versions are affected?
Affected versions include releases prior to 1.3.2 across affected packages: python-jose.
What version fixes CVE-2016-7036?
Upgrading to 1.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is python-jose affected?
Yes, python-jose is affected in releases prior to 1.3.2. Upgrade your dependency to 1.3.2 or later.
What is the CVSS score of CVE-2016-7036?
CVE-2016-7036 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-7036?
CVE-2016-7036 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check PyPI dependencies for CVE-2016-7036?
Run the dependency tree command: 'pip show python-jose'. 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-w799-prg3-cx77",
  "modified" : "2024-10-16T20:42:13Z",
  "published" : "2022-05-17T03:02:29Z",
  "aliases" : [ "CVE-2016-7036" ],
  "summary" : "python-jose failure to use a constant time comparison for HMAC keys",
  "details" : "python-jose before 1.3.2 allows attackers to have unspecified impact by leveraging failure to use a constant time comparison for HMAC keys.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "python-jose"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-7036"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mpdavis/python-jose/pull/35/commits/89b46353b9f611e9da38de3d2fedf52331167b93"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mpdavis/python-jose/commit/73007d6887a7517ac07c6e755e494baee49ef513"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mpdavis/python-jose"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mpdavis/python-jose/releases/tag/1.3.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/python-jose/PYSEC-2017-28.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210123221523/http://www.securityfocus.com/bid/95845"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-31T21:03:29Z",
    "nvd_published_at" : "2017-01-23T21:59:00Z"
  }
}