# CVE-2021-37942: APM Java Agent Local Privilege Escalation

- Priority: **Routine**
- Reason: Not severe (CVSS 7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-11-22 · Modified: 2024-08-04
- Aliases: GHSA-5xqm-hc45-f2g2
- Record: https://cvemate.com/vulnerability/CVE-2021-37942 · JSON: https://cvemate.com/vulnerability/CVE-2021-37942/json

## Description

```text
A local privilege escalation issue was found with the APM Java agent, where a user on the system could attach a malicious plugin to an application running the APM Java agent. By using this vulnerability, an attacker could execute code at a potentially higher level of permissions than their user typically has access to.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.262%, percentile 19.171%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- elastic apm\_java\_agent: ≥ 1.18.0, ≤ 1.27.0
- elastic elastic apm java agent: ≥ 1.18.0, \< 1.27.0
- co.elastic.apm apm-agent-parent (Maven): ≥ 1.18.0, \< 1.27.1
- co.elastic.apm elastic-apm-agent (Maven): ≥ 1.18.0, \< 1.27.1

## References

- <https://discuss.elastic.co/t/apm-java-agent-security-update/291355>
- <https://www.elastic.co/community/security>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-37942>
- <https://github.com/elastic/apm-agent-java>

---

Data as of 2026-12-05T09:22:03.316Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
