Protect against a security vulnerability affecting all Nexus OSS and Nexus Professional versions prior to and including 2.7.0-06
A critical security vulnerability (CVE-2014-0792) has been discovered by Sonatype in Nexus which requires immediate action. The vulnerability makes use of an execution path in an open source library that we have now (with the available patch) added a mitigating control for. This advisory provides the pertinent information needed to properly mitigate this vulnerability, along with the details on how to reach us if you have any further questions or concerns.
We identified this vulnerability during our security research activities and are not aware of any active exploits taking advantage of this issue. However, we strongly encourage all users of Nexus to immediately take the steps outlined in this advisory.
The identified vulnerability can allow an attacker controlled remote object creation and arbitrary code execution in the running Nexus instance without requiring user authentication. Although not every version of Nexus has been proven to allow for arbitrary code execution and object creation we are still considering the possibility that such a condition may exist, and we are highly recommending all instances of Nexus have the patch, detailed in this advisory, applied.
This vulnerability is fixed in Nexus 2.7.1 and greater. Download it from these locations:
If you want to patch an existing instance to address this vulnerability see below.
This patch can be installed on any Nexus 2.x version earlier than 2.7.1. If you are running a 1.x version of Nexus you must upgrade before applying this patch. For detailed information on upgrade compatibility, please see the Nexus Upgrade and Compatibility Notes.
The latest versions of Nexus can be found here:
Archived 2.x releases can be found here:
- OSS: http://www.sonatype.org/nexus/archived
- Pro: https://docs.sonatype.com/display/SPRTNXPRO/Downloads
This patch works by building a white-list of allowed classes which can be instantiated. This mechanism will cover all Nexus use cases, but it may not cover all third party (non-Sonatype) Nexus plugins. We advise testing the patch in a non-production instance if you are using third party plugins.
If there is an issue related to the patch it will manifest itself in response to HTTP requests failing with error 400. In the logs you will see a message such as the following:
WARN: ...whitelist.TypeWhitelist - Type NOT allowed: <classname>
ConversionException: No converter specified for class <classname>
If you encounter this error see the Configuration section below for instructions on how to remedy the problem.
- Shut down Nexus
- Remove the old
- Start Nexus
- Verify the patch is applied by examining
$NEXUS_HOME/logs/wrapper.logfor a message similar to:
2014-01-07 14:43:47 INFO [jetty-main-thread-1] - com.thoughtworks.xstream.XStream - Version: 1.4.6-SONATYPE-02, white-list support available
Note: The log message above will not appear in the
Third-Party Plugin Patch Configuration
If you are using plugins which are not supplied by Sonatype that register with xstream in a non-standard way it may be necessary to extend the whitelist. Please see the configuration article for instructions.
Frequently Asked Questions
Q: What is the risk associated with this vulnerability?
A: Nexus can be compromised, allowing an attacker to execute arbitrary code or allow for arbitrary class instantiation. The compromise is limited to the boundaries of privileges of the Nexus server process. This implies an attack could result in tampering or otherwise exfiltrating data from the Nexus instance.
Q: What preconditions must be met in order to be vulnerable?
A: An attacker must have network access to the Nexus instance. Therefore, internet accessible instances of Nexus imply available access by very large audience versus the more limited audience associated with non-internet accessible instances. Nexus 2.7.0 is known to be vulnerable to arbitrary code execution and other versions may be. All versions are subject to arbitrary class instantiation, which could lead to system compromise.
Q: Are there implications associated with this advisory itself?
A: Public disclosure unfortunately means bad actors may try to take advantage. While we have initially limited the information to the minimum details necessary for users to affect an appropriate fix, this merely slows down a would be attacker. As such, we are advising all organizations utilizing Nexus to immediately assess their individual impact and take appropriate action in response.
Q: Where can I obtain more information associated with the vulnerability?
A: Sonatype will be releasing details of this vulnerability as part of a standard CVE disclosure process. At this time, and in the interest of best protecting our user community, we are limiting the information released to that absolutely required in order to assess impact and affect remediation.
Q: How did Sonatype discover this vulnerability?
A: The vulnerability was identified during our internal security research activities. Specifically, this was not in response to known attacks, and therefore allowed for a proactive response.
Q: Was Sonatype’s CLM platform used in response to this vulnerability?
A: Yes. In this particular case, the open source component at the core of the issue may not be vulnerable in and of itself. This debate is still ongoing. At a minimum though, certain uses could result in exposing a vulnerability, and we found this to be the case in Nexus. While CLM did not alert us to a particular vulnerability, it was used to identify the applications within our overall portfolio that were using this particular component and pinpoint the locations requiring further investigation. If it is decided that the underlying component is in fact vulnerable, that information will be added to the CLM feed and thus all customers using this component would receive an alert about their own potential vulnerability via the CLM platform.
Q: Why is Sonatype making this information publicly available?
A: This is part of a responsible disclosure process. Given Nexus is an open source project used by over 20,000 organizations worldwide, notifying the user base will invariably lead to broad dissemination. We are taking a concerted and proactive approach in our outreach activities and an effort to achieve the most rapid remediation possible.