Insecure Certificate Verification in Requests Library - CVE-2024-35195

requests Updated 02 Oct 2025

Summary

20/05/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-35195: Requests is a HTTP library. Affects requests versions < 2.32.3+dfsg-1. Fixed in 2.32.3+dfsg-1. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Requests library is a widely used HTTP library for Python, designed to simplify making HTTP requests. It provides a user-friendly interface for sending HTTP requests, handling responses, and managing sessions. However, prior to version 2.32.0, the library exhibited a critical vulnerability related to certificate verification, which could lead to security risks when communicating with servers over HTTPS.

Vulnerability Detail

The vulnerability arises when a user makes an initial request with the 'verify=False' option to disable SSL certificate verification. In this scenario, all subsequent requests to the same host will continue to ignore certificate verification, regardless of any changes made to the 'verify' parameter. This behavior persists for the entire lifecycle of the connection in the connection pool, potentially exposing users to man-in-the-middle attacks and other security threats. The issue was identified in versions prior to 2.32.0 and has been addressed in version 2.32.0.

How To Fix

Minimum fixed version

2.32.3+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade requests

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using 'verify=False' in their requests. Instead, ensure that SSL certificate verification is enabled by either omitting the 'verify' parameter or setting it to 'True'. This will help mitigate the risk until the library is updated.

Conclusion

The Requests library vulnerability CVE-2024-35195 poses significant security risks by allowing insecure SSL certificate verification. Users are strongly advised to update to the latest version to protect their applications from potential attacks. Implementing best practices for SSL verification will further enhance security.

See every vulnerability recorded for requests →

Share this vulnerability

FAQ

CVE-2024-35195 is a vulnerability in the Requests library that allows subsequent requests to ignore SSL certificate verification if the first request is made with 'verify=False'.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading a manifest file like package-lock.json, you can check for vulnerabilities in real-time.

The main risk is exposure to man-in-the-middle attacks, where an attacker can intercept and manipulate data transmitted between the client and server.

Yes, avoid using 'verify=False' in your requests to ensure that SSL certificate verification is enforced.

You can update the Requests library by running 'sudo apt-get update && sudo apt-get install requests' in your terminal.

Related vulnerabilities

Recent vulnerabilities recorded for requests.

How To Fix

Minimum fixed version

2.32.3+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade requests

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback