Skip to content
SQL injection Advisory Intermediate CVE-2024-35181CVE-2024-35182

GHSL-2024-013_GHSL-2024-014: SQL injection vulnerability in Meshery - CVE-2024-35181, CVE-2024-35182

Two SQL injection vulnerabilities in Meshery allowed a remote attacker to inject arbitrary SQL via the order and sort parameters of two HTTP endpoints, enabling data theft, database modification, and arbitrary file write through stacked queries.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

A SQL injection vulnerability in Meshery up to v0.7.22 allows a remote attacker to obtain sensitive information, alter database registries, or create arbitrary files via the order and sort parameters of two HTTP endpoints.

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

The application directly concatenated user-supplied order and sort parameters into SQL queries without parameterisation or validation.

Impact

Attackers could read and modify any database data, including performance profiles that may contain session cookies, and write arbitrary files on the server; the impact depends on authentication, authorisation, and the sensitivity of stored data.

What the attacker needed

Network access to the Meshery server; a valid session cookie (or local auth cookie)

The fix

The vulnerabilities were fixed in a pull request.

How it was found

  1. Send a request to the first endpoint with a crafted order parameter that attaches a new database file.
  2. Send a second request to create a table in the attached database.
  3. Send a third request to insert data into that table, resulting in a file with attacker-controlled content.
  4. Alternatively, use blind SQL injection techniques (e.g., with sqlmap) to extract data from the database.

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 without proper handling, letting an attacker change the command's meaning. Here, the order and sort parameters were used to build SQL queries, so an attacker could run their own SQL commands, read or change data, and even write files on the server.

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 ghsecuritylab

View all

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