CVE-2016-7036: python-jose HMAC Key Comparison Vulnerability
Summary
CVE-2016-7036: python-jose before 1.3.2 allows attackers to have unspecified impact by leveraging failure to use a constant time comparison for HMAC keys. Affects python-jose versions < 1.3.2. Fixed in 1.3.2. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
python-jose is a Python library that provides a way to encode and decode JSON Web Tokens (JWTs). It is commonly used for implementing authentication and authorization mechanisms in web applications. The library allows users to generate, sign, and verify JWTs using various algorithms. However, prior to version 1.3.2, python-jose did not use a constant time comparison for HMAC keys, which could lead to security vulnerabilities.
Vulnerability Detail
The vulnerability (CVE-2016-7036) in python-jose arises from the failure to use a constant time comparison for HMAC keys. This flaw can be exploited by attackers to have an unspecified impact. By leveraging this vulnerability, an attacker could potentially manipulate or bypass the authentication and authorization mechanisms implemented using python-jose, leading to unauthorized access, data breaches, or other security compromises.
How To Fix
Latest published version: 3.5.0 as of 22 Oct 2026
pip install --upgrade "python-jose==3.5.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.3.2
This is the first release that contains the fix.
pip install --upgrade "python-jose==1.3.2"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The python-jose HMAC Key Comparison Vulnerability (CVE-2016-7036) is a security flaw that can be exploited by attackers to manipulate or bypass authentication and authorization mechanisms implemented using python-jose. To mitigate this vulnerability, it is crucial to update python-jose to version 1.3.2 or later. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for python-jose →
FAQ
python-jose is a Python library used for encoding and decoding JSON Web Tokens (JWTs). It is commonly used for implementing authentication and authorization mechanisms in web applications.
The impact of this vulnerability can vary depending on the specific implementation of python-jose. However, it could potentially allow attackers to manipulate or bypass authentication and authorization mechanisms, leading to unauthorized access, data breaches, or other security compromises.
To fix this vulnerability, it is recommended to update python-jose to version 1.3.2 or later. This version includes the necessary fix to ensure a constant time comparison for HMAC keys. Users can update the library by running the following command:
pip install --upgrade python-jose
No specific workaround has been provided for this vulnerability. It is recommended to update python-jose to the fixed version.
More information about this vulnerability can be found in the official advisory database for python-jose: https://github.com/pypa/advisory-database/blob/main/vulns/python-jose/PYSEC-2017-28.yaml
Related vulnerabilities
Recent vulnerabilities recorded for python-jose.