Skip to content
SQL injection Advisory Intermediate CVE-2023-30625

GHSL-2022-097: SQL injection in rudderlabs/rudder-server - CVE-2023-30625

Blind SQL injection in rudder-server's warehouse endpoint allows unauthenticated users to inject SQL via the source_id parameter, potentially leading to remote code execution because the database role has superuser permissions.

Kwstubbs Follow

Originally disclosed on GitHub Security Lab

Blind SQL injections are present in rudder-server that allows unauthenticated users to achieve Remote Code Execution.

Kwstubbs, 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

Root cause

User-controlled input (source_id) is formatted directly into a SQL query without sanitisation or parameterisation.

Impact

This issue may lead to Remote Code Execution (RCE) due to the `rudder` role in PostgresSQL having superuser permissions by default.

What the attacker needed

Network access to the rudder-server endpoint; no authentication required

The fix

The vulnerable code was fixed.

How it was found

  1. Send a POST request to the v1/warehouse/pending-events endpoint with a JSON body containing a malicious source_id value.
  2. The source_id is inserted into a SQL query, allowing the attacker to execute arbitrary SQL commands.

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, the source_id value is placed directly into a SQL statement, so an attacker can run their own database commands. Because the database user has superuser rights, this can lead to running commands on the server itself.

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 Kwstubbs

View all

43 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.