# APM Java Agent Security Update

**URL:** <https://discuss.elastic.co/t/apm-java-agent-security-update/289627>\
**Category:** Security Announcements\
**Created:** [November 18, 2021, 5:41pm UTC](https://discuss.elastic.co/t/apm-java-agent-security-update/289627 "2021-11-18T17:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![douglasday](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/douglasday/32/74044_2.png) [@douglasday](https://discuss.elastic.co/u/douglasday)\
**Post date:** [November 18, 2021, 5:41pm UTC](https://discuss.elastic.co/t/apm-java-agent-security-update/289627/1 "2021-11-18T17:41:52Z")

</div>

**APM Java Agent Local Privilege Escalation issue (ESA-2021-29)**

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](https://www.elastic.co/guide/en/apm/agent/java/current/setup-attach-cli.html), the [attach API](https://www.elastic.co/guide/en/apm/agent/java/current/setup-attach-api.html), as well as users that have enabled the [profiling\_inferred\_spans\_enabled](https://www.elastic.co/guide/en/apm/agent/java/current/config-profiling.html#config-profiling-inferred-spans-enabled) option.

**Affected Versions:**

Versions 1.10.0 through 1.26.0

**Solutions and Mitigations:**

Update to 1.27.0 or newer or use the unaffected [-javaagent-based installation method](https://www.elastic.co/guide/en/apm/agent/java/current/setup-javaagent.html) and disable the [profiling\_inferred\_spans\_enabled](https://www.elastic.co/guide/en/apm/agent/java/current/config-profiling.html#config-profiling-inferred-spans-enabled) option.

**CVSSv3:** 7.0 - AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

**CVE ID:** CVE-2021-37941

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:33am UTC](https://discuss.elastic.co/t/apm-java-agent-security-update/289627/2 "2022-11-04T08:33:04Z")

</div>


