CVE-2021-37942: APM Java Agent Local Privilege Escalation issue
7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.27392%
CWE
Published
11/22/2023
Updated
11/22/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| co.elastic.apm:apm-agent-parent | maven | >= 1.18.0, < 1.27.1 | 1.27.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper privilege management (CWE-269) during plugin loading. The APM Java agent allows local users to attach plugins, but the functions responsible for loading and executing plugin code (e.g., PluginManager.loadPlugins and AgentClassLoader.defineClass) lack sufficient security checks. This enables privilege escalation by loading untrusted plugins. The patch in version 1.27.1 likely introduced validation for plugin sources and privilege context, which aligns with the mitigation guidance to use the -javaagent-based installation method (which restricts dynamic attachment). The functions are inferred based on the vulnerability's mechanics and common Java agent design patterns.