CVE-2021-37942 APM Java Agent Local Privilege Escalation

High 7.0 Published Updated

A local attacker can attach a malicious plugin to an application using the Elastic APM Java Agent to execute code 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-37942?

CVE-2021-37942 is a high-severity vulnerability in Elastic APM Java Agent, published on 22 Nov 2023. 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 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.

Weakness: CWE-269

Which versions are affected by CVE-2021-37942?

4 open source packages ship an affected version, including co.elastic.apm:apm-agent-parent and co.elastic.apm:elastic-apm-agent. It affects 1 product.

PackageAffectedFixed in
co.elastic.apm:apm-agent-parent MavenFrom 1.18.01.27.1
co.elastic.apm:apm-agent-parent MavenFrom 1.18.01.27.1
co.elastic.apm:elastic-apm-agent MavenFrom 1.18.01.27.1
co.elastic.apm:elastic-apm-agent MavenFrom 1.18.01.27.1

Products include Elastic Apm Java Agent.

How do I fix CVE-2021-37942?

Upgrade co.elastic.apm:apm-agent-parent to 1.27.1 or later.

Is CVE-2021-37942 being exploited?

There is no known exploitation of CVE-2021-37942 in the wild and no public exploit code.

Sources

Also known as GHSA-5xqm-hc45-f2g2.

Is CVE-2021-37942 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free