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

GHSL-2020-132: SQL Injection in Mailtrain - CVE-2020-24617

The 'column' parameter in the statsClickedSubscribersByColumn function was used without validation to format a SQL query, allowing SQL injection. An attacker could exploit this to cause denial of service, perform timing-based blind reads, or potentially achieve remote code execution or arbitrary file read if database permissions were misconfigured.

jarlob Follow

Originally disclosed on GitHub Security Lab

SQL injection and missing CSRF protection may lead to Remote Code Execution (RCE) or arbitrary file read.

jarlob, on GitHub Security Lab

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

Impact

This issue may lead to RCE or arbitrary file read, but only if the database user is improperly configured; otherwise it may still cause denial of service or a timing-based blind read. Authentication is not needed if chained with CSRF.

What the attacker needed

Database user with excessive privileges (for RCE/file read); victim logged in (for CSRF chain)

The fix

The SQL injection part was fixed by the vendor on 13/07/2020.

How it was found

  1. Send a POST request to /campaigns/clicked/ajax/1/gdgdg/stats with a crafted 'column' parameter.
  2. Observe that the request lacks a CSRF token, allowing cross-site exploitation.

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 directly into a database command, letting an attacker change the command's meaning. Here, the 'column' value was not checked, so an attacker could send a special value that makes the database wait (a timing attack) or do other harmful things. The report also notes that the request lacked a CSRF token, meaning a malicious website could make a logged-in user's browser send the attack without the attacker needing credentials.

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 jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

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.