Skip to content
SQL injection Advisory Intermediate CVE-2024-29031

GHSL-2023-249: SQL injection vulnerability in Meshery - CVE-2024-29031

A SQL injection vulnerability in Meshery's GetMeshSyncResources endpoint allows an attacker to inject arbitrary SQL via the order parameter. This can lead to arbitrary file write, data modification, and data extraction, including session cookies.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

A SQL injection vulnerability in Meshery up to v0.6.181 allows a remote attacker to obtain sensitive information via the order parameter of GetMeshSyncResources.

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 concatenates the user-supplied 'order' parameter into a SQL query without sanitisation or parameterisation.

Impact

An attacker could write arbitrary files, modify or read any data in the database, including session cookies and Kubernetes configurations, depending on authentication and authorisation settings.

What the attacker needed

Access to the API endpoint; a valid cookie (e.g., meshery-provider=None for local auth)

The fix

The vulnerability was fixed by the maintainers in a pull request.

How it was found

  1. Send a request to the endpoint with an order parameter that attaches a new database file.
  2. Send a request to create a table in the attached database.
  3. Send a request to insert data into the table.
  4. Verify the file was created with the expected content.

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 'order' parameter is used directly in a database command, so an attacker can add extra commands to read or write files and data.

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.