Sonatype Nexus Repository
Sonatype Nexus Repository Remote Code Execution Vulnerability
Sonatype Nexus Repository before 3.21.2 allows JavaEL Injection (issue 1 of 2).
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- < 3.21.2
Fixed in 3.21.2
from GitHub Security Advisory GHSA-g2f6-v5qh-h2mq
Mitigation
Upgrade org.sonatype.nexus:nexus-extdirect to 3.21.2 or later.
Timeline
Days relative to CVE publicationFirst public PoC 5.8 days after publication; added to CISA KEV 1.6 years after publication. First PoC: wsfengfan/CVE-2020-10199-10204 (created 7 Apr 2020, found by us: backfilled).
PoC repositories
Found on GitHub.4 PoCs · 1 pending · 3 informational
PoCs 4
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| wsfengfan/CVE-2020-10199-10204 | 7 Apr 2020 +5.8 d | 19 | PoC |
| zhzyker/CVE-2020-10199_POC-EXP | 16 Apr 2020 +15 d | 43 | PoC |
| aleenzz/CVE-2020-10199 | 15 May 2020 +43 d | 31 | PoC |
| hugosg97/CVE-2020-10199-Nexus-3.21.01 | 13 Jun 2023 +3.2 y | 0 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Live-Hack-CVE/CVE-2020-10199 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
Informational 3
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| jas502n/CVE-2020-10199 | 8 Apr 2020 +6.5 d | 35 | Informational · write-up |
| magicming200/CVE-2020-10199_CVE-2020-10204 | 8 Apr 2020 +6.7 d | 25 | Informational · write-up |
| finn79426/CVE-2020-10199 | 21 May 2025 +5.1 y | 0 | Informational · write-up |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Exploit-DB | Nexus Repository Manager - Java EL Injection RCE (Metasploit) | 17 Apr 2020 | 14 Nov 2026 |
| Exploit-DB | Sonatype Nexus 3.21.1 - Remote Code Execution (Authenticated) | 6 Jan 2021 | 14 Nov 2026 |
| Metasploit | Metasploit exploit: Nexus Repository Manager Java EL Injection RCE (exploit/linux/http/nexus_repo_manager_el_injection) | 15 Apr 2020 | 14 Nov 2026 |
| nuclei template | nuclei template: Sonatype Nexus Repository Manager 3 - Remote Code Execution | 27 Apr 2023 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 4 PoC reposPOST /service/rest/beta/repositories/go/group
- Key headers
404: whoami404: {var}Accept: application/json, text/plain, */*Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Cookie: {var}Cookie: jenkins-timestamper-offset=-28800000; Hm_lvt_8346bb07e7843cd10a2ee33017b3d627=1583249520; NX-ANTI-CSRF-TOKEN=0.6153568974227819; NXSESSIONID={var}Cookie: NX-ANTI-CSRF-TOKEN={var}; NXSESSIONID={var}Nx-Anti-Csrf-Token: {var}Nx-Anti-Csrf-Token: 0.6153568974227819Origin: http://{var}:{var}Referer: http://{var}:{var}X-Nexus-Ui: trueX-Requested-With: XMLHttpRequest- Body markers
"name":"internal""online":"true""storage""blobStoreName":"default""strictContentTypeValidation":"true""group""memberNames""username""password"inapplication/json- Ports
- 8080, 8081
- PoC User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36- Seen in
- 4 repos: aleenzz/CVE-2020-10199, hugosg97/CVE-2020-10199-Nexus-3.21.01, wsfengfan/CVE-2020-10199-10204, zhzyker/CVE-2020-10199_POC-EXP
- Evidence
- aleenzz/CVE-2020-10199/CVE-2020-10199.py:50 hugosg97/CVE-2020-10199-Nexus-3.21.01/exploit.py:42 wsfengfan/CVE-2020-10199-10204/Nexus-CVE-2020-POC.py:50 zhzyker/CVE-2020-10199_POC-EXP/cve-2020-10199_cmd.py:79 zhzyker/CVE-2020-10199_POC-EXP/cve-2020-10199_poc.py:47
POST /service/rapture/session
- Key headers
X-Nexus-Ui: trueX-Requested-With: XMLHttpRequest- Body markers
username=password=inapplication/x-www-form-urlencoded- Ports
- 8080, 8081
- PoC User-Agent
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36- Seen in
- 3 repos: aleenzz/CVE-2020-10199, hugosg97/CVE-2020-10199-Nexus-3.21.01, zhzyker/CVE-2020-10199_POC-EXP
- Evidence
- aleenzz/CVE-2020-10199/CVE-2020-10199.py:36 hugosg97/CVE-2020-10199-Nexus-3.21.01/exploit.py:21 zhzyker/CVE-2020-10199_POC-EXP/cve-2020-10199_cmd.py:43
POST /service/extdirect
- Key headers
Accept: application/json, text/plain, */*Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Cookie: {var}Nx-Anti-Csrf-Token: {var}Origin: http://{var}:{var}Referer: http://{var}:{var}X-Nexus-Ui: trueX-Requested-With: XMLHttpRequest- Content-Type
application/json- PoC User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0- Seen in
- 1 repo: wsfengfan/CVE-2020-10199-10204
- Evidence
- wsfengfan/CVE-2020-10199-10204/Nexus-CVE-2020-POC.py:39
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/service/rest/beta/repositories/go/group(?:[?#].*)?$
(?i)^/service/rapture/session(?:[?#].*)?$
(?i)^/service/extdirect(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2020-10199 Sonatype Nexus Repository exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/service/rest/beta/repositories/go/group"; http.header; content:"404: whoami"; nocase; http.header_names; content:"404"; nocase; http.header; content:"Accept: application/json, text/plain, */*"; nocase; http.header; content:"Accept-Language: zh-CN,zh|3b|q=0.8,zh-TW|3b|q=0.7,zh-HK|3b|q=0.5,en-US|3b|q=0.3,en|3b|q=0.2"; nocase; http.header_names; content:"Cookie"; nocase; http.header; content:"Cookie: jenkins-timestamper-offset=-28800000|3b| Hm_lvt_8346bb07e7843cd10a2ee33017b3d627=1583249520|3b| NX-ANTI-CSRF-TOKEN=0.6153568974227819|3b| NXSESSIONID="; nocase; http.header; content:"Cookie: NX-ANTI-CSRF-TOKEN="; nocase; http.header_names; content:"Nx-Anti-Csrf-Token"; nocase; http.header; content:"Nx-Anti-Csrf-Token: 0.6153568974227819"; nocase; http.header; content:"Origin: http://"; nocase; http.header; content:"Referer: http://"; nocase; http.header; content:"X-Nexus-Ui: true"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; http.request_body; content:"|22|name|22|:|22|internal|22|"; http.request_body; content:"|22|online|22|:|22|true|22|"; http.request_body; content:"|22|storage|22|"; http.request_body; content:"|22|blobStoreName|22|:|22|default|22|"; http.request_body; content:"|22|strictContentTypeValidation|22|:|22|true|22|"; http.request_body; content:"|22|group|22|"; http.request_body; content:"|22|memberNames|22|"; http.request_body; content:"|22|username|22|"; http.request_body; content:"|22|password|22|"; reference:url,poc.griffinguard.io/cve/CVE-2020-10199; classtype:web-application-attack; sid:9540045; rev:1;)
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2020-10199 Sonatype Nexus Repository exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/service/rapture/session"; http.header; content:"X-Nexus-Ui: true"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; http.request_body; content:"username="; http.request_body; content:"password="; reference:url,poc.griffinguard.io/cve/CVE-2020-10199; classtype:web-application-attack; sid:9311286; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2020-10199 Sonatype Nexus Repository exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/service/extdirect"; http.header; content:"Accept: application/json, text/plain, */*"; nocase; http.header; content:"Accept-Language: zh-CN,zh|3b|q=0.8,zh-TW|3b|q=0.7,zh-HK|3b|q=0.5,en-US|3b|q=0.3,en|3b|q=0.2"; nocase; http.header_names; content:"Cookie"; nocase; http.header_names; content:"Nx-Anti-Csrf-Token"; nocase; http.header; content:"Origin: http://"; nocase; http.header; content:"Referer: http://"; nocase; http.header; content:"X-Nexus-Ui: true"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2020-10199; classtype:web-application-attack; sid:9221006; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Sonatype Nexus Repository exploit attempt (CVE-2020-10199)
id: gg-pocmon-cve-2020-10199-9540045
status: experimental
description: Request pattern taken from public PoCs for CVE-2020-10199. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2020-10199
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/service/rest/beta/repositories/go/group'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2020.10199
title: Sonatype Nexus Repository exploit attempt (CVE-2020-10199)
id: gg-pocmon-cve-2020-10199-9311286
status: experimental
description: Request pattern taken from public PoCs for CVE-2020-10199. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2020-10199
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/service/rapture/session'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2020.10199
title: Sonatype Nexus Repository exploit attempt (CVE-2020-10199)
id: gg-pocmon-cve-2020-10199-9221006
status: experimental
description: Request pattern taken from public PoCs for CVE-2020-10199. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2020-10199
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/service/extdirect'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2020.10199