CVE-2021-37941 APM Java Agent Local Privilege Escalation
A local attacker can attach a malicious file to an application using the APM Java Agent to execute commands with elevated privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-37941?
CVE-2021-37941 is a high-severity vulnerability in Elastic APM Java Agent, published on 8 Dec 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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
Weakness: CWE-269
Which versions are affected by CVE-2021-37941?
3 open source packages ship an affected version, including elastic-apm. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
elastic-apm PyPI | From 1.10.0 | 1.27.0 |
elastic-apm PyPI | From 1.10.0 | 1.27.0 |
elastic-apm PyPI | From 1.10.0 | 1.27.0 |
Products include Elastic Apm Agent.
How do I fix CVE-2021-37941?
Upgrade elastic-apm to 1.27.0 or later.
Is CVE-2021-37941 being exploited?
There is no known exploitation of CVE-2021-37941 in the wild and no public exploit code.
Other vulnerabilities in Elastic APM Java Agent
Sources
Also known as GHSA-r562-m862-63w3, PYSEC-2026-634.