CVE-2011-4940 Cross-site scripting in n/a

Low 2.6 Published Updated

Remote attackers can execute cross-site scripting attacks against Internet Explorer 7 via UTF-7 encoding due to missing charset parameters in directory listings.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2011-4940?

CVE-2011-4940 is a low-severity cross-site scripting vulnerability in Python Python, published on 27 Jun 2012. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The list_directory function in Lib/SimpleHTTPServer.py in SimpleHTTPServer in Python before 2.5.6c1, 2.6.x before 2.6.7 rc2, and 2.7.x before 2.7.2 does not place a charset parameter in the Content-Type HTTP header, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks against Internet Explorer 7 via UTF-7 encoding.

Weakness: CWE-79

Which versions are affected by CVE-2011-4940?

It affects 1 product.

Products include Python Python.

How do I fix CVE-2011-4940?

Upgrade to a fixed version.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2011-4940 being exploited?

There is no known exploitation of CVE-2011-4940 in the wild and no public exploit code.

All Python Python vulnerabilities

Sources

Also known as AZL-109590, CVE-2012-2639, DEBIAN-CVE-2011-4940, GHSA-cr6h-6cqx-mw3f, PSF-2012-1.

Is CVE-2011-4940 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free