← Vulnerability feed

Vulnerability record · CVE-2021-31856 · published 28 April 2021

CVE-2021-31856: Layer5 Meshery REST API SQL injection via order parameter

Layer5 · Meshery

Layer5 Meshery 0.5.2 contains a SQL injection flaw in its REST API, specifically in the order parameter handled by GetMesheryPatterns in models/meshery_pattern_persister.go. An unauthenticated remote attacker can inject arbitrary SQL through the /experimental/patternfiles endpoint, which matters because the database backing the API can be read or modified directly.

9.8 CVSS 3.1 Critical EPSS 75% · top 0.5% CWE-89 · SQL injection
9.8CVSS 3.1 base score, v2 7.5
75%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References
17 Jun 2026Last modified by NVD

Description

A SQL Injection vulnerability in the REST API in Layer5 Meshery 0.5.2 allows an attacker to execute arbitrary SQL commands via the /experimental/patternfiles endpoint (order parameter in GetMesheryPatterns in models/meshery_pattern_persister.go).

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

critical priorityUnauthenticated network-reachable SQL injection with CVSS 9.8 and very high EPSS makes this an urgent patch target despite no KEV listing.

What it is

Layer5 Meshery 0.5.2 contains a SQL injection flaw in its REST API, specifically in the order parameter handled by GetMesheryPatterns in models/meshery_pattern_persister.go. An unauthenticated remote attacker can inject arbitrary SQL through the /experimental/patternfiles endpoint, which matters because the database backing the API can be read or modified directly.

Impact

An attacker can execute arbitrary SQL commands against the Meshery database, gaining full read and write access to stored data and potentially compromising the underlying database server. The CVSS vector rates confidentiality, integrity and availability impact as high.

Attack surface

Reachable over the network through the /experimental/patternfiles REST endpoint with no authentication and no user interaction required, per the CVSS vector AV:N/AC:L/PR:N/UI:N. Any host that can reach the Meshery API can attempt the injection.

Exploitation

Not listed in CISA KEV and no ransomware associations are documented, but EPSS is very high at 0.754 (99.5th percentile), indicating strong predicted exploitation activity. The only references are the vendor patch PR and product page, with no public exploit or PoC tag supplied.

What to do

  • Upgrade Meshery past 0.5.2 using the fix in layer5io/meshery pull request 2745.
  • Do not expose the Meshery REST API, especially /experimental/patternfiles, to untrusted networks; restrict it to trusted management networks or a VPN.
  • Apply parameterized queries or strict allow-listing for the order parameter if any custom or forked code remains.
  • Run the Meshery database account with least privilege so injected SQL cannot reach unrelated schemas or perform administrative actions.
  • Monitor and log API requests to the patternfiles endpoint for anomalous order parameter values.

Detection

  • Inspect Meshery API access logs for requests to /experimental/patternfiles with SQL metacharacters, UNION, comment markers or boolean expressions in the order parameter.
  • Alert on database errors or unusual query patterns originating from the Meshery service account.
  • Baseline normal order parameter values and flag deviations or unusually long parameter strings.
  • Watch for unexpected reads or writes to Meshery database tables that do not correlate with normal UI or API usage.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
https://github.com/layer5io/meshery/pull/2745 PatchThird Party Advisory
https://meshery.io ProductVendor Advisory
https://github.com/layer5io/meshery/pull/2745 PatchThird Party Advisory
https://meshery.io ProductVendor Advisory

Track CVE-2021-31856 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2024-36535Layer5 meshery improper access control vulnerabilityInsecure permissions in meshery v0.7.51 allows attackers to access sensitive data and escalate privileges by obtaining the service account's token.EPSS 0.48%9.8CVE-2023-46575Layer5 meshery sql injection vulnerabilityA SQL injection vulnerability exists in Meshery prior to version v0.6.179, enabling a remote attacker to retrieve sensitive information and execute a…EPSS 1.3%8.1CVE-2024-35181Layer5 meshery sql injection vulnerabilityMeshery is an open source, cloud native manager that enables the design and management of Kubernetes-based infrastructure and applications. A SQL inj…EPSS 1.6%8.1CVE-2024-35182Layer5 meshery sql injection vulnerabilityMeshery is an open source, cloud native manager that enables the design and management of Kubernetes-based infrastructure and applications. A SQL inj…EPSS 1.6%7.5CVE-2024-29031Layer5 meshery sql injection vulnerabilityMeshery is an open source, cloud native manager that enables the design and management of Kubernetes-based infrastructure and applications. A SQL inj…EPSS 0.96%9.8CVE-2026-76461Cisco AsyncOS email parsing SQL injection allows root command executionCisco AsyncOS Software for Cisco Secure Email Gateway fails to properly validate email parsing input, allowing crafted email messages containing mali…KEVEPSS 28%analysed9.3CVE-2026-9586Sangoma Switchvox unauthenticated SQL injection in /pa endpointSangoma Switchvox SMB Edition 8.3 (104997) fails to sanitize the PhoneIP value from XML content beginning with <PolycomIPPhone> before concatenating …KEVEPSS 19%analysed10.0CVE-2026-72898Metabase unauthenticated SQL injection in reset_password endpointMetabase exposes a database endpoint, '/reset_password', that fails to neutralize attacker-supplied SQL, allowing arbitrary SQL injection. Because th…KEVEPSS 19%analysed

Source: NIST National Vulnerability Database (record CVE-2021-31856), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.