Skip to content
SQL injection Advisory Intermediate CVE-2020-6145

ERPNext frappe.desk.reportview.get SQL injection vulnerability

The field parameter in the frappe.desk.reportview.get handler is vulnerable to SQL injection. An authenticated attacker can send a crafted HTTP request to inject SQL commands, potentially reading or modifying data.

Yuri Kramarz Follow

Originally disclosed on Cisco Talos

Medium 6.4 View original

An SQL injection vulnerability exists in the frappe.desk.reportview.get functionality of ERPNext 11.1.38. A specially crafted HTTP request can cause an SQL injection.

Yuri Kramarz, on Cisco Talos

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 the application builds SQL queries by directly inserting user-supplied field names into the query string without proper sanitisation or parameterisation.

Impact

An authenticated attacker could read or modify data in the database, potentially leading to limited confidentiality and integrity impact.

What the attacker needed

Authenticated user account

How it was found

  1. Send an authenticated POST request to the frappe.desk.reportview.get endpoint with a crafted field parameter containing SQL injection.
  2. The server processes the request and passes the field parameter into a database query.
  3. The injected SQL is executed, allowing the attacker to manipulate the query.

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 when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, a logged-in user can send a special request to the ERPNext server that tricks the database into running unintended commands. This could let them read or alter data they shouldn't access.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by Yuri Kramarz

View all

57 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.