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

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2021-12-08T21:15:19.000Z
- Modified: 2026-07-06T08:11:23.942Z
- Also known as: GHSA-r562-m862-63w3, PYSEC-2026-634
- Weaknesses: CWE-269
- Assigned by: elastic

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

(As written by CVE List.)

## Affected

- Elastic APM Java Agent: 1.10.0 through 1.26.0
- elastic-apm (PyPI): from 1.10.0 before 1.27.0
- elastic apm_agent: from 1.10.0 up to 1.26.0

## Every score

- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://discuss.elastic.co/t/apm-java-agent-security-update/289627> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-37941> (advisory)
- <https://github.com/elastic/apm-agent-python> (package)
- <https://pypi.org/project/elastic-apm> (package)
- <https://github.com/advisories/GHSA-r562-m862-63w3> (advisory)

## Sources

- CVE List: [CVE-2021-37941](https://www.cve.org/CVERecord?id=CVE-2021-37941), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-r562-m862-63w3](https://github.com/advisories/GHSA-r562-m862-63w3), CC-BY-4.0, modified 2026-07-06
- NVD: [CVE-2021-37941](https://nvd.nist.gov/vuln/detail/CVE-2021-37941), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-634](https://osv.dev/vulnerability/PYSEC-2026-634), CC-BY-4.0, modified 2026-07-06

---

Page: https://cve.day/CVE-2021-37941 · Whole record: https://cve.day/CVE-2021-37941.json · Rebuilt by cve.day 2026-11-25T22:58:05.897Z
