CVE-2024-35182 GHSL-2024-014 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-35182?

CVE-2024-35182 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 `GetAllEvents` at the API URL `/api/v2/events`. The sort query parameter read in `events_streamer.go` is directly used to build a SQL query in `events_persister.go`. Version 0.7.22 fixes this issue by using the `SanitizeOrderInput` function.

Weakness: CWE-89

Which versions are affected by CVE-2024-35182?

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-35182?

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-35182 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35182 exists.

Sources

Also known as GHSA-h7cm-jvpp-69xf, GO-2024-3051.

Is CVE-2024-35182 in your software?

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

Check your SBOMs for free