SECURITY-360 Advisory

Article ID:234805187
2 minute readKnowledge base


  • We have been able to confirm an unauthenticated remote code execution vulnerability in Jenkins (all versions) with CLI enabled.


  • CloudBees Jenkins Platform >= 1.609

  • Private Saas Edition <= 1.3.1


The recommended resolution, as described in the CloudBees Jenkins Security Advisory 2016-11-16 is upgrading to the releases that include the fix:

  • CloudBees Jenkins Operations Center 2.7.x.y (Rolling Train) should be upgraded to

  • CloudBees Jenkins Operations Center 2.7.x.0.y (Fixed Train) should be upgraded to

  • CloudBees Jenkins Operations Center 1.625.x.y should be upgraded to 1.625.21.1

  • CloudBees Jenkins Enterprise 2.7.x.y (Rolling Train) should be upgraded to

  • CloudBees Jenkins Enterprise 2.7.x.0.y (Fixed Train) should be upgraded to

  • CloudBees Jenkins Enterprise 1.651.x.y should be upgraded to 1.651.21.1

  • CloudBees Jenkins Enterprise 1.642.x.y should be upgraded to 1.642.21.1

  • Jenkins LTS should be upgraded to 2.19.3

  • Jenkins main line should be upgraded to Jenkins 2.32

Expansion of the Serialization Denylist

The major part of the security fix is an expansion of the serialization denylist used for remoting (Jenkins CLI and master/agent communication) and Xstream (XML configuration and data files).

It is possible that legitimate uses of classes in denylisted packages will no longer work. This will be indicated by any of the following in exception messages in logs:

Rejected: com.sun.rmi.EvilClass
Refusing to unmarshal com.sun.rmi.EvilClass for security reasons
Refusing to marshal com.sun.rmi.EvilClass for security reasons

In these examples, com.sun.rmi.EvilClass is a placeholder for a real class name. It is possible to customize the denylist used by setting the hudson.remoting.ClassFilter.DEFAULTS_OVERRIDE_LOCATION System property for the Jenkins controller java invocation. It is expected to be set to the path to a file containing a complete, custom denylist overriding the default one. The default denylist is defined in in the remoting component. In a configuration file as used for hudson.remoting.ClassFilter.DEFAULTS_OVERRIDE_LOCATION, the default denylist would look like this:


Removing or relaxing entries on this denylist must be done carefully as to not open yourself up to known exploits. A possible alternative could be to disable the CLI via HTTP and JNLP agent port (see below) to prevent its unauthenticated use.

Disabling the CLI

Another change in the released versions is the new feature to disable the CLI over HTTP and JNLP by setting the System property jenkins.CLI.disabled to true. This is a more convenient alternative to run the Groovy script provided as a workaround to SECURITY-218 and SECURITY-360 for users who do not want to allow unauthenticated access to the Jenkins CLI even with the security fix.

While the CLI can be used using the Jenkins integrated SSH daemon as well, this requires authentication, so it’s not a vector for unauthenticated attacks. To disable this feature as well, disable the SSH server port in Manage Jenkins » Configure Jenkins » SSH Server.

Additional Information