Vulnerability PYSEC-2026-1873

Medium Risk
MEDIUM RISK
CVSS Score: 5.6
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
3 months ago
July 07, 2026 at 11:45 AM UTC
Requests `Session` object does not verify requests after making first request with verify=False
0.0.1 - 0.12.01 and 0.12.1 - 2.31.0
0.0.1 - 0.12.01 and 0.12.1 - 2.31.0

Summary

Requests `Session` object does not verify requests after making first request with verify=False

Details

When using a requests.Session, if the first request to a given origin is made with verify=False, TLS certificate verification may remain disabled for all subsequent requests to that origin, even if verify=True is explicitly specified later.

This occurs because the underlying connection is reused from the session's connection pool, causing the initial TLS verification setting to persist for the lifetime of the pooled connection. As a result, applications may unintentionally send requests without certificate verification, leading to potential man-in-the-middle attacks and compromised confidentiality or integrity.

This behavior affects versions of requests prior to 2.32.0.

Impacted packages

Timeline

Published
3 months ago
July 07, 2026 at 11:45 AM UTC
Fixed (2.32.0)
2 years ago
May 20, 2024 at 04:11 PM UTC
Last Modified
3 months ago
July 07, 2026 at 05:46 PM UTC