CVE-2021-3116
Python vulnerability analysis and mitigation

Overview

CVE-2021-3116 is a security vulnerability discovered in proxy.py version 2.3.0, a feature-rich HTTP proxy server written in Python. The vulnerability was discovered on January 9, 2021, and affects the basic authentication mechanism of the proxy server. The issue was disclosed privately to the developers and subsequently fixed in version 2.3.1 (Cardaci Advisory).

Technical details

The vulnerability exists in the before_upstream_connection function within proxy/http/proxy/auth.py. The issue stems from a logic bug where incorrect boolean operators (and instead of or) were used in the authentication validation code. This implementation error allows bypass of the proxy authentication mechanism because the condition check uses AND operators instead of OR operators, meaning that if any one of the conditions is false, the authentication check would pass (Cardaci Advisory, GitHub Fix).

Impact

The vulnerability allows attackers to bypass the proxy authentication mechanism completely. Any valid header with any credentials would work, effectively nullifying the authentication protection. This means unauthorized users could access the proxy server regardless of the configured credentials (Cardaci Advisory).

Exploitability

The vulnerability is easily exploitable by sending any credentials in the Proxy-Authorization header. A proof of concept demonstrates that while requests without credentials are correctly rejected with a 407 Proxy Authentication Required error, requests with any arbitrary credentials (e.g., 'x:x') are allowed through (Cardaci Advisory).

Mitigation and workarounds

The vulnerability was fixed in proxy.py version 2.3.1. The fix involved changing the logical operators from 'and' to 'or' in the authentication validation code. Users should upgrade to version 2.3.1 or later to address this security issue (GitHub Fix).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-61539CRITICAL10
  • Python logoPython
  • xinference
NoYesAug 21, 2026
CVE-2026-49360HIGH7.8
  • Python logoPython
  • recce
NoYesAug 21, 2026
CVE-2026-68508HIGH7.8
  • Python logoPython
  • hydra-core
NoYesAug 21, 2026
CVE-2026-54457HIGH7.7
  • Python logoPython
  • tensorzero
NoYesAug 21, 2026
CVE-2026-43980MEDIUM6.3
  • Python logoPython
  • malla
NoNoAug 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management