{"id":"CVE-2026-97687","kind":"vulnerability","aliases":["CVE-2026-97687","GHSA-8988-9cw3-xx77"],"related":[],"title":"urllib3: HTTPS proxy TLS configuration may be ignored or overridden","description":"## Impact\r\n\r\nurllib3 supports configuring TLS independently for an HTTPS proxy and the target server.\r\n\r\n`proxy_ssl_context`, `proxy_assert_hostname`, and `proxy_assert_fingerprint` configure the TLS connection to the proxy. `ssl_context` and the other target-specific TLS parameters configure the connection to the target server.\r\n\r\nIn urllib3 versions 1.26.0 through 2.7.0, these configurations were not consistently separated. Depending on the proxy mode, urllib3 could:\r\n\r\n1. Ignore `proxy_ssl_context` and use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.\r\n2. Override the HTTPS proxy's certificate-verification policy with the target server's certificate-verification policy.\r\n3. Apply target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials to the TLS connection to an HTTPS forwarding proxy.\r\n\r\nIn particular, configuring `cert_reqs=\"CERT_NONE\"` for a target server could overwrite the `verify_mode` of the SSL context configured for the HTTPS proxy. This modification occurred in place and persisted on the context object, potentially disabling proxy certificate verification for later connections that reused the same context.\r\n\r\nAn attacker able to intercept the connection to an HTTPS proxy may be able to impersonate the proxy when the effective proxy TLS configuration disables certificate verification or otherwise accepts the attacker's certificate. This may occur, for example, when the target server's trust or identity policy is incorrectly applied to the proxy connection.\r\n\r\nWhen HTTPS forwarding is enabled, an impersonated proxy can observe or modify forwarded requests and responses, potentially exposing credentials, authentication tokens, request bodies, response data, and other sensitive information.\r\n\r\nA TLS client certificate intended for the target server may also be presented to the proxy or to an attacker impersonating it. This can disclose the client's identity and provide proof of possession of the corresponding private key. The private key itself is not transmitted during the TLS handshake.\r\n\r\nIn CONNECT tunneling mode, impersonating the HTTPS proxy does not by itself defeat the separate end-to-end TLS connection between the client and the target server.\r\n\r\n## Affected Usages\r\n\r\nCode using urllib3 versions 1.26.0 through 2.7.0 may be affected in any of the following cases.\r\n\r\n### 1. The target SSL context is used for an HTTPS forwarding proxy\r\n\r\nHTTPS requests are forwarded through an HTTPS proxy with `use_forwarding_for_https=True`, and `proxy_ssl_context` is configured for the proxy.\r\n\r\nurllib3 may ignore `proxy_ssl_context` and use the target server's `ssl_context` for the proxy TLS handshake. The proxy may therefore be verified using the target server's trust and certificate policy instead of the policy explicitly configured for the proxy.\r\n\r\n### 2. The target verification policy overrides the proxy policy\r\n\r\nAn HTTPS proxy is configured with `proxy_ssl_context`, while the target server uses a different certificate-verification policy.\r\n\r\nurllib3 may apply the target server's `cert_reqs` value to the proxy SSL context. For example, setting `cert_reqs=\"CERT_NONE\"` for the target server may also disable certificate verification for the HTTPS proxy, even when `proxy_ssl_context` was configured to require verification.\r\n\r\nThis issue can affect the TLS connection to an HTTPS proxy in both forwarding and CONNECT tunneling configurations.\r\n\r\n### 3. A mutated proxy SSL context is reused\r\n\r\nThe same SSL context is reused as `proxy_ssl_context` across multiple connections, and certificate verification is disabled for one target server.\r\n\r\nurllib3 may modify the proxy SSL context's `verify_mode` in place. Later connections that reuse the same context may therefore connect to the HTTPS proxy without certificate verification.\r\n\r\n### 4. Target-specific TLS identity or credentials are applied to the proxy\r\n\r\nHTTPS requests are forwarded through an HTTPS proxy with `use_forwarding_for_https=True`, and target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials are configured.\r\n\r\nurllib3 may apply these target-specific settings to the proxy TLS handshake. This may cause urllib3 to:\r\n\r\n- send SNI intended for the target server to the proxy;\r\n- verify the proxy using a hostname or certificate fingerprint intended for the target server; or\r\n- present a TLS client certificate intended for the target server to the proxy.\r\n\r\nCode connecting through a plain HTTP proxy does not establish a TLS connection to the proxy and is not affected by this issue.\r\n\r\n## Remediation\r\n\r\nUpgrade to urllib3 2.8.0 or later.\r\n\r\nurllib3 2.8.0 independently applies the explicitly configured `proxy_ssl_context` and proxy-specific certificate assertions to the HTTPS proxy connection. Target-specific SNI, certificate assertions, and TLS client certificate parameters are no longer applied to the HTTPS proxy handshake.\r\n\r\nFor backward compatibility, when an HTTPS proxy is used with `use_forwarding_for_https=True` and `proxy_ssl_context` is not provided, urllib3 2.8.0 continues to use `ssl_context` for the TLS connection to the proxy. This configuration emits a `FutureWarning`. In urllib3 3.0, passing `ssl_context` with `use_forwarding_for_https=True` for an HTTPS proxy will raise an error. Applications should use `proxy_ssl_context` to configure TLS for an HTTPS forwarding proxy.\r\n\r\nThe fixes were implemented in commits b6447295fff7b38fdffc67e0df9712d60cef3cc3 and 07408cec79d1856d81bb42c74a904a24fdb9e465.","summary":"urllib3 versions 1.26.0 through 2.7.0 can mix up TLS settings meant for the target server and the HTTPS proxy, so the proxy connection may skip certificate verification. An attacker who can intercept traffic to the proxy can impersonate it and read or change forwarded requests and responses, including credentials and tokens.","severity":"high","cvss":8.1,"epss":0.00206,"exploited":false,"exploited_at":null,"products":[{"name":"urllib3","note":">=1.26.0, <2.8.0","fixed":["2.8.0"],"affected":">= 1.26.0, < 2.8.0","ecosystem":"pypi"},{"name":"python urllib3","fixed":["2.8.0"],"affected":">= 1.26.0, < 2.8.0","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-295","cwe-440","package","proxy","pypi","python","self-hosted","urllib3"],"not_affected_if":["connect-tunnel-only","default-config","no-https-proxy","plain-http-proxy"],"how_to_check":"- Check the installed version with `pip show urllib3` or `python -c \"import urllib3; print(urllib3.__version__)\"`; affected versions are `1.26.0` through `2.7.0`.\n- Search the codebase for `proxy_ssl_context`, `use_forwarding_for_https`, and `ssl_context` to see whether HTTPS proxies are used with forwarding.\n- Look for `cert_reqs=\"CERT_NONE\"` in code that also uses an HTTPS proxy.","fix":"- Upgrade `urllib3` to `2.8.0` or later.\n- Use `proxy_ssl_context` to configure TLS for an HTTPS forwarding proxy; passing `ssl_context` with `use_forwarding_for_https=True` emits a `FutureWarning` in `2.8.0` and raises an error in `3.0`.","status":"open","published_at":"2026-09-15T19:42:08+00:00","first_seen_at":"2026-11-09T22:53:21+00:00","triaged_at":"2026-11-09T22:59:20+00:00","updated_at":"2026-11-09T23:10:12+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-09T22:59:20Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `urllib3` to `2.8.0` or later.\n- Use `proxy_ssl_context` to configure TLS for an HTTPS forwarding proxy; passing `ssl_context` with `use_forwarding_for_https=True` emits a `FutureWarning` in `2.8.0` and raises an error in `3.0`.","reach":"network","title":"urllib3: HTTPS proxy TLS settings may be ignored, skipping proxy certificate checks","impact":"high","summary":"urllib3 versions 1.26.0 through 2.7.0 can mix up TLS settings meant for the target server and the HTTPS proxy, so the proxy connection may skip certificate verification. An attacker who can intercept traffic to the proxy can impersonate it and read or change forwarded requests and responses, including credentials and tokens.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","urllib3","pypi","self-hosted","proxy"],"confidence":0.85,"fix_status":"available","needs_auth":"no","worst_case":"attacker impersonates HTTPS proxy and reads forwarded credentials","analyst_note":"","how_to_check":"- Check the installed version with `pip show urllib3` or `python -c \"import urllib3; print(urllib3.__version__)\"`; affected versions are `1.26.0` through `2.7.0`.\n- Search the codebase for `proxy_ssl_context`, `use_forwarding_for_https`, and `ssl_context` to see whether HTTPS proxies are used with forwarding.\n- Look for `cert_reqs=\"CERT_NONE\"` in code that also uses an HTTPS proxy.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["plain-http-proxy","no-https-proxy","connect-tunnel-only","default-config"],"who_is_affected":"Applications that route HTTPS requests through an HTTPS forwarding proxy with urllib3 and set separate TLS options for the proxy and the target server are exposed. Code that uses a plain HTTP proxy, or CONNECT tunneling without forwarding, is not affected by the proxy handshake issue, though the advisory notes a client certificate may still be exposed in some cases. Teams that never configure an HTTPS proxy can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.001075,"input_tokens":6600,"output_tokens":829,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':12A,21A '-295':27B '-440':29B '-8988':15A '-9':16A '-97687':13A,22A '1':156C,450C '1.26.0':40B,140C,438C '2':178C,528C '2.7.0':42B,142C,440C '3':197C,620C '4':679C 'abl':272C,283C 'accept':299C 'across':638C 'affect':432C,443C,605C 'also':364C,584C 'appli':198C,320C,559C,688C 'assert':107C,111C,204C,207C 'attack':66B,271C,301C,373C 'authent':344C 'bodi':347C 'case':449C 'cert':224C,226C,564C,575C,577C 'certif':63B,185C,194C,205C,260C,295C,303C,357C,517C,554C,586C,642C,677C 'certificate-verif':184C,193C,553C 'chang':80B 'client':210C,356C,380C,427C 'code':434C 'configur':5A,92C,113C,130C,144C,223C,241C,293C,481C,524C,541C,598C,619C 'connect':60B,116C,132C,172C,215C,264C,276C,324C,405C,424C,608C,617C,640C,663C,671C 'consist':147C 'context':105C,121C,160C,168C,240C,255C,269C,454C,479C,490C,498C,545C,571C,596C,625C,631C,637C,656C,668C 'correspond':390C 'could':155C,232C 'credenti':86B,211C,343C,686C 'cve':11A,20A 'cw3':18A 'cw3-xx77':17A 'cwe':26B,28B 'data':349C 'defeat':416C 'depend':149C 'differ':552C 'disabl':258C,294C,585C,645C 'disclos':378C 'effect':290C 'enabl':329C 'end':420C,422C 'end-to-end':419C 'even':592C 'exampl':308C,573C 'explicit':523C 'expos':342C 'fingerprint':112C,206C 'follow':448C 'forward':81B,176C,219C,327C,337C,460C,465C,472C,615C,695C 'ghsa':14A 'handshak':403C,503C 'host':36B 'hostnam':108C,203C 'https':2A,55B,97C,175C,181C,218C,244C,279C,326C,410C,459C,462C,468C,474C,538C,590C,611C,674C,692C 'ident':316C,382C,684C 'ignor':8A,157C,487C 'impact':89C 'imperson':75B,285C,331C,374C,408C 'includ':85B 'incorrect':319C 'independ':94C 'inform':353C 'instead':519C 'intend':358C 'intercept':69B,274C 'issu':603C 'key':392C,395C 'later':263C,662C 'may':6A,61B,281C,305C,363C,441C,486C,506C,558C,583C,651C,669C 'meant':48B 'mix':44B 'mode':153C,236C,407C,659C 'modif':247C 'modifi':336C,652C 'multipl':639C 'mutat':622C 'none':227C,578C 'object':256C 'observ':334C 'occur':248C,306C 'one':647C 'otherwis':298C 'overrid':179C,533C 'overridden':10A 'overwrit':233C 'packag':30B 'paramet':129C 'particular':222C 'persist':252C 'place':250C,661C 'polici':187C,196C,317C,518C,522C,532C,536C,556C 'possess':387C 'potenti':257C,341C 'present':366C 'privat':391C,394C 'proof':385C 'provid':384C 'proxi':3A,31B,56B,59B,73B,98C,103C,106C,110C,119C,152C,158C,177C,182C,220C,245C,259C,280C,287C,291C,323C,332C,369C,411C,461C,469C,477C,484C,488C,501C,505C,527C,535C,539C,543C,569C,591C,594C,612C,623C,635C,654C,675C,691C 'pypi':32B 'python':24A,33B 'read':78B 'req':225C,565C,576C 'request':82B,338C,346C,463C,693C 'requir':600C 'respons':84B,340C,348C 'reus':266C,627C,633C,665C 'self':35B 'self-host':34B 'sensit':352C 'separ':148C,418C 'server':52B,102C,136C,165C,191C,231C,312C,362C,431C,495C,513C,549C,562C,582C,649C 'set':47B,574C 'skip':62B 'sni':202C 'specif':127C,201C,682C 'ssl':104C,120C,159C,167C,239C,453C,478C,489C,497C,544C,570C,595C,624C,630C,636C,655C 'support':91C 'target':51B,101C,126C,135C,164C,190C,200C,230C,311C,361C,430C,452C,494C,512C,530C,548C,561C,581C,648C,681C 'target-specif':125C,199C,680C 'therefor':507C,670C 'tls':4A,46B,93C,115C,128C,171C,209C,214C,292C,355C,402C,423C,502C,607C,683C 'token':88B,345C 'traffic':70B 'transmit':399C 'true':475C 'trust':314C,515C 'tunnel':406C,618C 'urllib3':1A,23A,25A,37B,38B,90C,138C,154C,436C,485C,557C,650C 'usag':433C 'use':162C,435C,456C,471C,492C,510C,550C 'valu':566C 'verif':64B,186C,195C,261C,296C,531C,555C,587C,601C,643C,678C 'verifi':235C,509C,658C 'version':39B,139C,437C 'without':676C 'xx77':19A","nicknames":[],"mitigations":[],"who_affected":"Applications that route HTTPS requests through an HTTPS forwarding proxy with urllib3 and set separate TLS options for the proxy and the target server are exposed. Code that uses a plain HTTP proxy, or CONNECT tunneling without forwarding, is not affected by the proxy handshake issue, though the advisory notes a client certificate may still be exposed in some cases. Teams that never configure an HTTPS proxy can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["pythonurllib3","urllib3"],"ptokens":["python","urllib3"],"labels":["cwe295","cwe440","high","package","proxy","pypi","python","selfhosted","urllib3","vendor"],"campaign_type":null,"search_a":"'-2026':12A,21A '-8988':15A '-9':16A '-97687':13A,22A 'configur':5A 'cve':11A,20A 'cw3':18A 'cw3-xx77':17A 'ghsa':14A 'https':2A 'ignor':8A 'may':6A 'overridden':10A 'proxi':3A 'python':24A 'tls':4A 'urllib3':1A,23A,25A 'xx77':19A","search_b":"'-295':27B '-440':29B '1.26.0':40B '2.7.0':42B 'attack':66B 'certif':63B 'chang':80B 'connect':60B 'credenti':86B 'cwe':26B,28B 'forward':81B 'host':36B 'https':55B 'imperson':75B 'includ':85B 'intercept':69B 'may':61B 'meant':48B 'mix':44B 'packag':30B 'proxi':31B,56B,59B,73B 'pypi':32B 'python':33B 'read':78B 'request':82B 'respons':84B 'self':35B 'self-host':34B 'server':52B 'set':47B 'skip':62B 'target':51B 'tls':46B 'token':88B 'traffic':70B 'urllib3':37B,38B 'verif':64B 'version':39B","search_c":"'1':156C,450C '1.26.0':140C,438C '2':178C,528C '2.7.0':142C,440C '3':197C,620C '4':679C 'abl':272C,283C 'accept':299C 'across':638C 'affect':432C,443C,605C 'also':364C,584C 'appli':198C,320C,559C,688C 'assert':107C,111C,204C,207C 'attack':271C,301C,373C 'authent':344C 'bodi':347C 'case':449C 'cert':224C,226C,564C,575C,577C 'certif':185C,194C,205C,260C,295C,303C,357C,517C,554C,586C,642C,677C 'certificate-verif':184C,193C,553C 'client':210C,356C,380C,427C 'code':434C 'configur':92C,113C,130C,144C,223C,241C,293C,481C,524C,541C,598C,619C 'connect':116C,132C,172C,215C,264C,276C,324C,405C,424C,608C,617C,640C,663C,671C 'consist':147C 'context':105C,121C,160C,168C,240C,255C,269C,454C,479C,490C,498C,545C,571C,596C,625C,631C,637C,656C,668C 'correspond':390C 'could':155C,232C 'credenti':211C,343C,686C 'data':349C 'defeat':416C 'depend':149C 'differ':552C 'disabl':258C,294C,585C,645C 'disclos':378C 'effect':290C 'enabl':329C 'end':420C,422C 'end-to-end':419C 'even':592C 'exampl':308C,573C 'explicit':523C 'expos':342C 'fingerprint':112C,206C 'follow':448C 'forward':176C,219C,327C,337C,460C,465C,472C,615C,695C 'handshak':403C,503C 'hostnam':108C,203C 'https':97C,175C,181C,218C,244C,279C,326C,410C,459C,462C,468C,474C,538C,590C,611C,674C,692C 'ident':316C,382C,684C 'ignor':157C,487C 'impact':89C 'imperson':285C,331C,374C,408C 'incorrect':319C 'independ':94C 'inform':353C 'instead':519C 'intend':358C 'intercept':274C 'issu':603C 'key':392C,395C 'later':263C,662C 'may':281C,305C,363C,441C,486C,506C,558C,583C,651C,669C 'mode':153C,236C,407C,659C 'modif':247C 'modifi':336C,652C 'multipl':639C 'mutat':622C 'none':227C,578C 'object':256C 'observ':334C 'occur':248C,306C 'one':647C 'otherwis':298C 'overrid':179C,533C 'overwrit':233C 'paramet':129C 'particular':222C 'persist':252C 'place':250C,661C 'polici':187C,196C,317C,518C,522C,532C,536C,556C 'possess':387C 'potenti':257C,341C 'present':366C 'privat':391C,394C 'proof':385C 'provid':384C 'proxi':98C,103C,106C,110C,119C,152C,158C,177C,182C,220C,245C,259C,280C,287C,291C,323C,332C,369C,411C,461C,469C,477C,484C,488C,501C,505C,527C,535C,539C,543C,569C,591C,594C,612C,623C,635C,654C,675C,691C 'req':225C,565C,576C 'request':338C,346C,463C,693C 'requir':600C 'respons':340C,348C 'reus':266C,627C,633C,665C 'sensit':352C 'separ':148C,418C 'server':102C,136C,165C,191C,231C,312C,362C,431C,495C,513C,549C,562C,582C,649C 'set':574C 'sni':202C 'specif':127C,201C,682C 'ssl':104C,120C,159C,167C,239C,453C,478C,489C,497C,544C,570C,595C,624C,630C,636C,655C 'support':91C 'target':101C,126C,135C,164C,190C,200C,230C,311C,361C,430C,452C,494C,512C,530C,548C,561C,581C,648C,681C 'target-specif':125C,199C,680C 'therefor':507C,670C 'tls':93C,115C,128C,171C,209C,214C,292C,355C,402C,423C,502C,607C,683C 'token':345C 'transmit':399C 'true':475C 'trust':314C,515C 'tunnel':406C,618C 'urllib3':90C,138C,154C,436C,485C,557C,650C 'usag':433C 'use':162C,435C,456C,471C,492C,510C,550C 'valu':566C 'verif':186C,195C,261C,296C,531C,555C,587C,601C,643C,678C 'verifi':235C,509C,658C 'version':139C,437C 'without':676C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-09-15T19:42:08+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-8988-9cw3-xx77","url":"https://github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77","severity":"high","published_at":"2026-09-15T19:42:08+00:00","modified_at":"2026-09-29T15:29:27+00:00","first_seen_at":"2026-11-09T22:53:21+00:00","fetched_at":"2026-11-09T22:53:21+00:00","note":null},{"source":"ghsa","external_id":"GHSA-8988-9cw3-xx77","url":"https://github.com/advisories/GHSA-8988-9cw3-xx77","severity":"high","published_at":"2026-09-30T14:46:04+00:00","modified_at":"2026-09-30T14:46:05+00:00","first_seen_at":"2026-11-09T22:57:50+00:00","fetched_at":"2026-11-09T22:57:50+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-97687","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97687","severity":null,"published_at":"2026-09-29T16:17:18+00:00","modified_at":"2026-10-13T20:27:23+00:00","first_seen_at":"2026-11-09T23:10:12+00:00","fetched_at":"2026-11-09T23:10:12+00:00","note":null}],"documents":[{"id":110529,"url":"https://github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-09-15T19:42:08+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":110886,"url":"https://api.github.com/repos/urllib3/urllib3/security-advisories/GHSA-8988-9cw3-xx77","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":110888,"url":"https://github.com/urllib3/urllib3/pull/5093","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":110889,"url":"https://github.com/urllib3/urllib3/commit/07408cec79d1856d81bb42c74a904a24fdb9e465","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":110890,"url":"https://github.com/urllib3/urllib3/commit/b6447295fff7b38fdffc67e0df9712d60cef3cc3","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":110881,"url":"https://github.com/urllib3/urllib3/releases/tag/2.8.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00206,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-97687"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}