PoC Monitor
← All CVEs
CVE-2020-10199published 1 Apr 2020 18:27 UTCData: JSON · API

Sonatype Nexus Repository

Sonatype Nexus Repository Remote Code Execution Vulnerability

Sonatype Nexus Repository before 3.21.2 allows JavaEL Injection (issue 1 of 2).

First public PoC 5.8 daysafter publication · 7 Apr 2020
Public PoCs84 on GitHub · 4 Exploit-DB, Metasploit or nuclei
CVSS8.8high · scored by CISA ADP · CWE-917
CISA KEV 3 Nov 20211.6 years after publication

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

org.sonatype.nexus:nexus-extdirect (Maven)
  • < 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 publication
t=0+90+180+270+360+450+540CVE published1 Apr 2020 · t = 0First public PoC7 Apr 2020 · t+5.8dAdded to CISA KEV3 Nov 2021 · t+1.6y

First 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
RepositoryCreatedStarsAssessment
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
RepositoryCreatedStarsAssessment
Live-Hack-CVE/CVE-2020-10199 unknown 0 Pending · repository unavailable (HTTP 404)
Informational 3
RepositoryCreatedStarsAssessment
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.

PoC characteristics

What to hunt for in your logs · from 4 PoC repos

POST /service/rest/beta/repositories/go/group

Key headers
404: whoami 404: {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.2 Cookie: {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.6153568974227819 Origin: http://{var}:{var} Referer: http://{var}:{var} X-Nexus-Ui: true X-Requested-With: XMLHttpRequest
Body markers
"name":"internal" "online":"true" "storage" "blobStoreName":"default" "strictContentTypeValidation":"true" "group" "memberNames" "username" "password" in application/json
Ports
8080, 8081
PoC User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0 Mozilla/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: true X-Requested-With: XMLHttpRequest
Body markers
username= password= in application/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.2 Cookie: {var} Nx-Anti-Csrf-Token: {var} Origin: http://{var}:{var} Referer: http://{var}:{var} X-Nexus-Ui: true X-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.

POST /service/rest/beta/repositories/go/group
(?i)^/service/rest/beta/repositories/go/group(?:[?#].*)?$
POST /service/rapture/session
(?i)^/service/rapture/session(?:[?#].*)?$
POST /service/extdirect
(?i)^/service/extdirect(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /service/rest/beta/repositories/go/group
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;)
POST /service/rapture/session
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;)
POST /service/extdirect
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.

POST /service/rest/beta/repositories/go/group
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
POST /service/rapture/session
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
POST /service/extdirect
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