Lucene search
K

Python CGI Documentation Cross Site Scripting

🗓️ 22 Mar 2023 00:00:00Reported by Georgi GuninskiType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 289 Views

Python CGI documentation vulnerability to cross site scriptin

Code
`Is there low hanging fruit for the following observation?  
  
The documentation of the python cgi module is vulnerable to XSS  
(cross site scripting)  
  
https://docs.python.org/3/library/cgi.html  
  
```  
form = cgi.FieldStorage()  
print("<p>name:", form["name"].value)  
print("<p>addr:", form["addr"].value)  
```  
  
First result on google for "tutorial python cgi"  
is https://www.tutorialspoint.com/python/python_cgi_programming.htm  
  
And it is almost the same as the python doc.  
  
I verified that setting ```name=<script>alert(document.domain)</script>```  
will trigger dialog, demonstrating javascript is executed  
on the cgi host.  
  
I would expect that devs who read the docs or tutorials will write  
vulnerable cgis.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation