CVE-2014-4650
Python vulnerability analysis and mitigation

Overview

The CGIHTTPServer module in Python versions 2.7.5 and 3.3.4 contains a critical security vulnerability that fails to properly handle URLs with URL-encoded path separators. This vulnerability was discovered in 2014 and assigned CVE-2014-4650. The issue affects multiple Python versions including Python 2.7.x (up to 2.7.8), Python 3.2.x (up to 3.2.6), Python 3.3.x (up to 3.3.6), and Python 3.4.x (up to 3.4.2) (NVD).

Technical details

The vulnerability stems from the CGIHTTPServer module's improper handling of URL-encoded path separators. The issue occurs because neither is_cgi() nor run_cgi() methods URL decode the path during processing until run_cgi() attempts to determine if the target script is an executable file. When a forward slash after the CGI directory in the URL is replaced with the URL-encoded variant %2f, the is_cgi() function returns False, causing the CGIHTTPRequestHandler to invoke its parent's send_head() method, which then translates the URL path to a file system path using the translate_path() method. The vulnerability has received a CVSS v3.1 base score of 9.8 (CRITICAL) (NVD, Python Bug Tracker).

Impact

The vulnerability enables remote attackers to read script source code, potentially exposing sensitive information such as access credentials. Additionally, attackers can conduct directory traversal attacks and execute unintended code through crafted character sequences. The vulnerability allows execution of CGI scripts that would normally be restricted, including those outside of designated CGI directories (Python Bug Tracker).

Mitigation and workarounds

A fix was implemented by URL decoding the path before checking if it refers to a CGI script. As a workaround, users can subclass CGIHTTPRequestHandler and override the is_cgi() method with a variant that first URL decodes the supplied path. The vulnerability was patched in Python versions 2.7.8, 3.2.6, 3.3.6, and 3.4.2 (Python Bug Tracker).

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-22033HIGH8.6
  • PythonPython
  • label-studio
NoNoJan 12, 2026
CVE-2025-68472HIGH8.1
  • PythonPython
  • mindsdb
NoYesJan 12, 2026
CVE-2026-22251MEDIUM5.3
  • PythonPython
  • wlc
NoYesJan 12, 2026
CVE-2026-22691LOW2.7
  • PythonPython
  • pypdf2
NoYesJan 10, 2026
CVE-2026-22250LOW2.5
  • PythonPython
  • wlc
NoYesJan 12, 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