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

- Severity: High 7.0 (CVSS:3.1, scored by elastic) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2023-11-22T01:33:48.984Z
- Modified: 2026-06-17T04:01:17.713Z
- Also known as: GHSA-5xqm-hc45-f2g2
- Weaknesses: CWE-269
- Assigned by: elastic

## Description

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.

(As written by CVE List.)

## Affected

- Elastic Elastic APM Java Agent: from 1.18.0 before 1.27.0
- co.elastic.apm:apm-agent-parent (Maven): from 1.18.0 before 1.27.1
- co.elastic.apm:elastic-apm-agent (Maven): from 1.18.0 before 1.27.1
- elastic apm_java_agent: from 1.18.0 up to 1.27.0

## Every score

- elastic: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://discuss.elastic.co/t/apm-java-agent-security-update/291355> (vendor-advisory, web)
- <https://www.elastic.co/community/security> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-37942> (advisory)
- <https://github.com/elastic/apm-agent-java> (package)

## Sources

- CVE List: [CVE-2021-37942](https://www.cve.org/CVERecord?id=CVE-2021-37942), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-5xqm-hc45-f2g2](https://github.com/advisories/GHSA-5xqm-hc45-f2g2), CC-BY-4.0, modified 2025-09-30
- NVD: [CVE-2021-37942](https://nvd.nist.gov/vuln/detail/CVE-2021-37942), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-37942 · Whole record: https://cve.day/CVE-2021-37942.json · Rebuilt by cve.day 2026-11-25T22:58:08.533Z
