Sonatype Nexus Security Advisory
Date: December 2, 2026
Affected Versions: All Sonatype Nexus Repository 3 CE/Pro versions from 3.0.0 up to and including 3.98.x
Fixed in Version: Sonatype Nexus Repository 3 CE/Pro version 3.99.0
CVSS: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:H/SA:N = 5.1 (Medium)
CWE: CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax
Sonatype Guide: https://guide.sonatype.com/vulnerability/CVE-2026-136953
Summary
Sonatype Nexus Repository 3 builds some absolute URLs in REST API and repository browse responses from HTTP host headers sent by the client. When a shared caching proxy sits in front of Nexus Repository and stores such a response, other users can receive URLs that point to a host chosen by an attacker. The attacker does not need an account. A request from the anonymous user is enough, if the endpoint is readable by the anonymous user.
Version 3.99.0 marks the affected responses as not cacheable. This removes the cache poisoning risk for caches that follow standard cache headers, and it applies without configuration. By default, Nexus Repository still builds these URLs from the host headers of each request. To stop this, an administrator must set a Base URL and turn on its Force setting (see Recommendation).
We are not aware of active exploitation of this vulnerability at the time of this announcement.
Recommendation
Upgrade to Sonatype Nexus Repository 3 CE/Pro version 3.99.0 or later. Download links are on https://help.sonatype.com/en/download.html.
After you upgrade, you must also configure a fixed Base URL. Set a Base URL in the Base URL capability and turn on its Force setting. To do this, use the capabilities REST API (/service/rest/v1/capabilities) and set the force property to true. As an alternative, set the system property described under Immediate Mitigation Options. Nexus Repository then uses the configured Base URL for all generated URLs and ignores host headers from requests. Without this step, Nexus Repository still builds URLs from the host headers of each request.
Force replaces the host in every generated URL. Set the Base URL to the public address that your clients use. An address that clients cannot reach can break features such as Docker path routing. If the onboarding wizard in your version offers a Force option, do not use it. It can switch off support for reverse proxy headers, and generated URLs then change from https to http.
Version 3.99.0 also marks the affected REST API and browse responses as not cacheable, and it validates the format of the X-Forwarded-Host header. These two changes apply without any configuration. The format check does not limit which host names are accepted. A cache that ignores Cache-Control headers can still store a poisoned response, so turn on Force if you use such a cache.
Immediate Mitigation Options
If you cannot upgrade now, use one or more of these options. The first option also applies after you upgrade.
- Set a Base URL in the Base URL capability, and set the system property
org.sonatype.nexus.internal.app.BaseUrlManagerImpl.force=trueinnexus.propertiesor as a JVM option. Restart Nexus Repository. It then uses the configured Base URL for generated URLs. The property has no effect without a configured Base URL. - Do not cache responses for
/service/rest/and/service/rest/repository/browse/. - Include the
HostandX-Forwarded-Hostheaders in the cache key. - Remove client-supplied
X-Forwarded-HostandForwardedheaders at your trusted edge proxy, and set them yourself. - If you do not use forwarded headers, disable the Forwarded Request capability in Nexus Repository.
Credit
This issue was discovered and reported responsibly by Yousif (s3c_krd) via Sonatype’s Bug Bounty Program.
Frequently Asked Questions
Q: What is the risk associated with this vulnerability?
A: An attacker can cause a shared cache to store REST API and browse responses that contain links to an attacker-controlled host. Users and automated build systems that follow these links can then download content from that host instead of from your Nexus Repository. Nexus Repository itself is not compromised, and the attacker cannot change the content that is stored in it.
Q: What preconditions must be met in order to be vulnerable?
A: The attacker must be able to send HTTP requests to Nexus Repository, directly or through your proxy. A shared caching proxy must sit in front of Nexus Repository and store REST API or browse responses without using the host headers in the cache key. No account is needed. The anonymous user can send the request when it can read the endpoint. Without a shared cache, the injected host is only visible in the response to the attacker’s own request.
Q: Are there implications associated with this advisory itself?
A: Public disclosure of a vulnerability can make it easier for bad actors to find and exploit unpatched systems. We recommend that you assess the impact on your environment and take action as soon as you can.
Q: Why is Sonatype making this information available?
A: Sonatype follows a responsible disclosure process. We publish this advisory after a fix is available, so that customers can protect their systems and make informed decisions.