/

CVE-2022-51027

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in MeterSphere Plugins

CVE-2022-51027

Received

Vulnerability type

Category:

Missing Authentication for Critical Function

CWE:

CWE-306

Impact:

Unauthenticated Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MeterSphere exposes plugin upload and invocation endpoints without requiring authentication, allowing unauthenticated users to reach sensitive functionality. If those endpoints are accessible to an attacker, the plugin execution path may enable remote code execution.

Affected context

The issue affects MeterSphere releases in the specified vulnerable version ranges when the /plugin/** endpoints are available with anonymous access. The risk arises where these endpoints permit plugin handling and method invocation without first verifying the caller's identity and authorization.

Exploit preconditions

  • Attack surface: The /plugin/** endpoints must be reachable over the network.
  • Required access: No authenticated account is required when anonymous access is enabled.
  • Trigger point: Plugin upload and custom method invocation functionality.
  • Why exploitation is possible: Plugin-related inputs reach class loading and method invocation without adequate authentication and authorization controls.

Why this happens

Critical plugin operations are exposed without an authentication check, mapping to CWE-306: Missing Authentication for Critical Function. The application allows caller-controlled plugin-related values to reach dynamic class loading and method invocation, creating a path to execute code when the endpoints are accessible to an unauthenticated caller.

Potential impact

  • An attacker could execute code in the MeterSphere application context.
  • The application or its underlying host may be compromised.
  • Sensitive data accessible to the application may be exposed or altered.
  • The compromise could disrupt services or provide a foothold for further activity.

General mitigation guidance

Mitigation generally focuses on protecting sensitive plugin operations and reducing the authority of code that handles plugins.

  • Require authentication and authorization for plugin upload and invocation operations.
  • Disable or restrict plugin-management endpoints when they are not needed.
  • Avoid exposing dynamic class loading and method invocation to caller-controlled values; use constrained registries or allowlists where dynamic behavior is necessary.
  • Run the application with least privilege and limit its access to sensitive data and system resources.
  • Apply network access controls to reduce exposure of administrative and plugin-related interfaces.

How teams detect issues like this

  • Review route and security configuration for plugin endpoints that allow anonymous access.
  • Use static analysis and code review to identify missing authorization checks on sensitive operations and caller-controlled inputs reaching class loading or reflective invocation.
  • Monitor application and network logs for unexpected requests to plugin upload or invocation routes, especially from unauthenticated sources.
  • Enforce policy checks that require explicit authorization for administrative and plugin-management functionality.

Sources

SourceLink
github.comgithub.com/metersphere/metersphere/commit/07155cf833
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/metersphere/metersphere-plugin-rce.yaml
web.archive.orgweb.archive.org/web/20220706000509/https://y4er.com/post/metersphere-plugincontroller-pre-auth-rce/
vulncheck.comvulncheck.com/advisories/metersphere-1.13.0-1.16.3-pre-auth-rce-via-plugin-custommethod
vulncheck.comvulncheck.com/advisories/metersphere-1.14.7-1.16.4-pre-auth-rce-via-plugin-custommethod

Frequently asked

questions

It may be exploitable remotely if the plugin endpoints are network-reachable and permit anonymous access.

The described issue is pre-authentication; an account is not required when anonymous access to the affected endpoints is available.

Require authentication and authorization before allowing plugin operations, and constrain dynamic class loading and method invocation.

Treat plugin management as privileged functionality, restrict endpoint exposure, review authorization boundaries, and run the application with least privilege.

Find out what's already
exploitable in your codebase.