CVE-2014-0792 Nexus Repository 2 - xstream Remote Code Execution - 2014-01-09

Protect against a security vulnerability affecting all Nexus Repository OSS and Nexus Repository Pro versions prior to and including 2.7.0-06


High - 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)


A critical security vulnerability (CVE-2014-0792) has been discovered by Sonatype in Nexus Repository 2 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 Repository 2 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 Repository 2 instance without requiring user authentication.  Although not every version of Nexus Repository 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 Repository 2 have the patch, detailed in this advisory, applied.

This vulnerability is fixed in Nexus Repository 2.7.1 and greater. Download it from these locations:

If you want to patch an existing instance to address this vulnerability see below.

Patch Compatibility

This patch can be installed on any Nexus Repository 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.

This patch works by building a white-list of allowed classes which can be instantiated. This mechanism will cover all Nexus Repository 2 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.

Patch Installation

To install this patch, download xstream-1.4.6-SONATYPE-02.jar [ sha1 07301a759dd5b00a7b96564b687702c3a2eef76c ] [ md5 9d6a38eba9ab3fab7858a8817088894f ] then:

  1. Shut down Nexus
  2. Remove the old $NEXUS_HOME/nexus/WEB-INF/lib/xstream-<version>.jar
  3. Copy xstream-1.4.6-SONATYPE-02.jar into $NEXUS_HOME/nexus/WEB-INF/lib/
  4. Start Nexus
  5. Verify the patch is applied by examining $NEXUS_HOME/logs/wrapper.log for 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 nexus.log file.

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.


If you run into any problems, or have any questions/concerns, please contact us. You can do this by filing a ticket at , or sending an email to .

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 Repository 2 server process.  This implies an attack could result in tampering or otherwise exfiltrating data from the Nexus Repository instance.


Q: What preconditions must be met in order to be vulnerable?

A: An attacker must have network access to the Nexus Repository instance.  Therefore, internet accessible instances of Nexus Repository imply available access by very large audience versus the more limited audience associated with non-internet accessible instances.  Nexus Repository 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:  Why is Sonatype making this information publicly available?

A:  This is part of a responsible disclosure process.  Given Nexus Repository 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.


Have more questions? Submit a request


Article is closed for comments.