CVE-2021-37941
HIGH 7.8CVSS 3.1APM Java Agent Local Privilege Escalation
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
- Published
- 8 Dec 2021
- Last modified
- 6 Jul 2026
- Assigned by
- security@elastic.co
- NVD status
- Modified
- Weakness
- CWE-269
- Also known as
- GHSA-r562-m862-63w3PYSEC-2026-634
- Sources
- NVDJSONOSV GHSA-r562-m862-63w3JSONOSV PYSEC-2026-634JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | elastic | apm_agentcpe:2.3:a:elastic:apm_agent:*:*:*:*:*:java:*:* |
>= 1.10.0, <= 1.26.0 | |
| OSV | PyPI | elastic-apm | >= 1.10.0, < 1.27.0 | 1.27.0 |
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
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 8 Dec 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 2 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 Dec 2021)