ERPNext SQL Injection Vulnerabilities
Several parameters in ERPNext v10.1.6 are vulnerable to SQL injection, allowing an authenticated attacker to inject SQL commands and compromise data. The report lists five parameters across different CVEs that can be exploited via crafted web requests.
Originally disclosed on Cisco Talos
Exploitable SQL injection vulnerabilities exists in the authenticated part of ERPNext v10.1.6. Specially crafted web requests can cause SQL injections resulting in data compromise.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, user-supplied input in several parameters is concatenated directly into SQL queries without proper sanitisation or parameterisation.
Impact
An authenticated attacker could read or modify data in the database, leading to data compromise.
What the attacker needed
Authenticated user account
How it was found
- Log in to ERPNext as an authenticated user.
- Send a crafted request to the search endpoint with a malicious searchfield parameter.
- Send a crafted request to the leave balance endpoint with a malicious employee parameter.
- Send a crafted request to the item dashboard endpoint with a malicious sort_order parameter.
- Send a crafted request to the item dashboard endpoint with a malicious sort_by parameter.
- Send a crafted request to the item dashboard endpoint with a malicious start parameter.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SQL injection is a way to trick a website's database into running unintended commands by inserting special characters into input fields. In this case, an attacker who is already logged in can send manipulated requests to make the database reveal or change data. The report shows several places where user input is not properly cleaned before being used in database queries.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.