CVE-2024-35181 GHSL-2024-013 Meshery SQL Injection vulnerability

Medium 5.9 Published Updated

Attackers can exploit SQL injection in Meshery to write arbitrary files and access or modify sensitive database data, including session cookies and Kubernetes configurations.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-35181?

CVE-2024-35181 is a medium-severity SQL injection vulnerability in meshery, published on 27 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Meshery is an open source, cloud native manager that enables the design and management of Kubernetes-based infrastructure and applications. A SQL injection vulnerability in Meshery prior to version 0.7.22 may lead to arbitrary file write by using a SQL injection stacked queries payload, and the ATTACH DATABASE command. Additionally, attackers may be able to access and modify any data stored in the database, like performance profiles (which may contain session cookies), Meshery application data, or any Kubernetes configuration added to the system. The Meshery project exposes the function `GetMeshSyncResourcesKinds` at the API URL `/api/system/meshsync/resources/kinds`. The order query parameter is directly used to build a SQL query in `meshync_handler.go`. Version 0.7.22 fixes this issue.

Weakness: CWE-89

Which versions are affected by CVE-2024-35181?

3 open source packages ship an affected version, including github.com/layer5io/meshery. It affects 1 product.

PackageAffectedFixed in
github.com/layer5io/meshery GoAll versionsNone
github.com/layer5io/meshery GoAll versions0.7.22
github.com/layer5io/meshery GoAll versions0.7.22

Products include Layer5 Meshery.

How do I fix CVE-2024-35181?

Upgrade github.com/layer5io/meshery to 0.7.22 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2024-35181 being exploited?

There is no known exploitation of CVE-2024-35181 in the wild and no public exploit code.

Sources

Also known as GHSA-9f24-jrv4-f8g5, GO-2024-3050.

Is CVE-2024-35181 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free