CVE-2021-37941 json
APM Java Agent Local Privilege Escalation
published 2021-12-08 4 y ago modified 2026-07-06 4 mo ago also GHSA-r562-m862-63w3 , PYSEC-2026-634 , EUVD-2021-2577
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 11%
- public exploits
- 0
- none known
Summary
A local privilege escalation issue was found with the APM Java agent, where a user on the system could attach a malicious file to an application running with the APM Java agent. Using this vector, a malicious or compromised user account could use the agent to run commands at a higher level of permissions than they possess. This vulnerability affects users that have set up the agent via the attacher cli 3, the attach API 2, as well as users that have enabled the profiling_inferred_spans_enabled option
Patch / fix
- pypi elastic-apm 1.27.0
Exploit prediction
0.21% chance of exploitation in the next 30 days, higher than 11% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | elastic-apm | >=1.10.0, <1.27.0 |
1.27.0 |
Affected products
- Elastic APM Java Agent
Classification
- Weakness
-
- CWE-269 Improper Privilege Management
References
-
discuss.elastic.co
/t/apm-java-agent-security-update/289627
web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-37941
advisory
-
github.com
/elastic/apm-agent-python
package
-
pypi.org
/project/elastic-apm
package
-
github.com
/advisories/GHSA-r562-m862-63w3
advisory
Sources
- CVE List CVE-2021-37941
- GitHub Advisory GHSA-r562-m862-63w3
- NVD CVE-2021-37941
- OSV PYSEC-2026-634
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.