Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities - Nessus

Critical   Plugin ID: 89925

This page contains detailed information about the Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 89925
Name: Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities
Filename: jenkins_1_650.nasl
Vulnerability Published: 2015-01-28
This Plugin Published: 2016-03-14
Last Modification Time: 2022-04-11
Plugin Version: 1.13
Plugin Type: combined
Plugin Family: CGI abuses
Dependencies: jenkins_detect.nasl, jenkins_nix_installed.nbin, jenkins_win_installed.nbin, macosx_jenkins_installed.nbin
Required KB Items [?]: installed_sw/Jenkins

Vulnerability Information


Severity: Critical
Vulnerability Published: 2015-01-28
Patch Published: 2016-02-24
CVE [?]: CVE-2016-0788, CVE-2016-0789, CVE-2016-0790, CVE-2016-0791, CVE-2016-0792
CPE [?]: cpe:/a:cloudbees:jenkins, cpe:/a:jenkins:jenkins
In the News: True

Synopsis

The remote web server hosts a job scheduling and management system that is affected by multiple vulnerabilities.

Description

The remote web server hosts a version of Jenkins that is prior to 1.650, or a version of Jenkins LTS prior to 1.642.2; or else a version of Jenkins Enterprise that is 1.642.x.y prior to 1.642.2.1, 1.625.x.y prior to 1.625.16.1, or 1.609.x.y prior to 1.609.16.1. It is, therefore, affected by the following vulnerabilities :

- An unspecified flaw exists in the Jenkins remoting module. An unauthenticated, remote attacker can exploit this to open a JRMP listener on the server hosting the Jenkins master process, allowing the execution of arbitrary code. (CVE-2016-0788)

- A flaw exists in main/java/hudson/cli/CLIAction.java due to improper sanitization of CRLF sequences, which are passed via CLI command names, before they are included in HTTP responses. An unauthenticated, remote attacker can exploit this, via crafted Jenkins URLs, to carry out an HTTP response splitting attack. (CVE-2016-0789)

- The verification of user-supplied API tokens fails to use a constant-time comparison algorithm. An unauthenticated, remote attacker can exploit this, via statistical methods, to determine valid API tokens, thus facilitating a brute-force attack to gain access to user credentials. (CVE-2016-0790)

- The verification of user-supplied XSRF crumbs fails to use a constant-time comparison algorithm. An unauthenticated, remote attacker can exploit this, via statistical methods, to determine valid XSRF crumbs, thus facilitating a brute-force attack to bypass the cross-site request forgery protection mechanisms. (CVE-2016-0791)

- A flaw exists in groovy.runtime.MethodClosure class due to unsafe deserialize calls of unauthenticated Java objects to the Commons Collections library. An authenticated, remote attacker can exploit this, by posting a crafted XML file to certain API endpoints, to execute arbitrary code. (CVE-2016-0792)

Solution

Upgrade Jenkins to version 1.650 or later, Jenkins LTS to version 1.642.2 or later, or Jenkins Enterprise to version 1.609.16.1 / 1.625.16.1 / 1.642.2.1 or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Immunity Canvas, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities vulnerability:

  1. Metasploit: exploit/multi/http/jenkins_xstream_deserialize
    [Jenkins XStream Groovy classpath Deserialization Vulnerability]
  2. Exploit-DB: exploits/multiple/remote/43375.rb
    [EDB-43375: Jenkins - XStream Groovy classpath Deserialization (Metasploit)]
  3. Exploit-DB: exploits/java/remote/42394.py
    [EDB-42394: Jenkins < 1.650 - Java Deserialization]
  4. GitHub: https://blog.csdn.net/u011721501/article/details/78548997
    [CVE-2016-0788]
  5. GitHub: https://github.com/GrrrDog/Java-Deserialization-Cheat-Sheet
    [CVE-2016-0788]
  6. GitHub: https://github.com/3vikram/Application-Vulnerabilities-Payloads
    [CVE-2016-0792]
  7. GitHub: https://github.com/84KaliPleXon3/Payloads_All_The_Things
    [CVE-2016-0792]
  8. GitHub: https://github.com/Aviksaikat/CVE-2016-0792
    [CVE-2016-0792: Modified Verion of CVE-2016-0792]
  9. GitHub: https://github.com/Delishsploits/PayloadsAndMethodology
    [CVE-2016-0792]
  10. GitHub: https://github.com/GuynnR/Payloads
    [CVE-2016-0792]
  11. GitHub: https://github.com/Muhammd/Awesome-Payloads
    [CVE-2016-0792]
  12. GitHub: https://github.com/R0B1NL1N/java-deserialization-exploits
    [CVE-2016-0792: Exploit for Jenkins serialization vulnerability - CVE-2016-0792]
  13. GitHub: https://github.com/XPR1M3/Payloads_All_The_Things
    [CVE-2016-0792]
  14. GitHub: https://github.com/andrysec/PayloadsAllVulnerability
    [CVE-2016-0792]
  15. GitHub: https://github.com/anhtu97/PayloadAllEverything
    [CVE-2016-0792]
  16. GitHub: https://github.com/apkadmin/PayLoadsAll
    [CVE-2016-0792]
  17. GitHub: https://github.com/chanchalpatra/payload
    [CVE-2016-0792]
  18. GitHub: https://github.com/koutto/jok3r-pocs
    [CVE-2016-0792]
  19. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2016-0792]
  20. GitHub: https://github.com/mrhacker51/ReverseShellCommands
    [CVE-2016-0792]
  21. GitHub: https://github.com/s0wr0b1ndef/java-deserialization-exploits
    [CVE-2016-0792: Exploit for Jenkins serialization vulnerability - CVE-2016-0792]
  22. GitHub: https://github.com/sobinge/PayloadsAllThesobinge
    [CVE-2016-0792]
  23. GitHub: https://github.com/sobinge/--1
    [CVE-2016-0792]
  24. GitHub: https://github.com/jpiechowka/jenkins-cve-2016-0792
    [CVE-2016-0792: Exploit for Jenkins serialization vulnerability - CVE-2016-0792]
  25. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2016-0788
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:ND
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the jenkins_1_650.nasl nessus plugin source code. This script is Copyright (C) 2016-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(89925);
  script_version("1.13");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id(
    "CVE-2016-0788",
    "CVE-2016-0789",
    "CVE-2016-0790",
    "CVE-2016-0791",
    "CVE-2016-0792"
  );
  script_xref(name:"CERT", value:"576313");

  script_name(english:"Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server hosts a job scheduling and management system
that is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote web server hosts a version of Jenkins that is prior to
1.650, or a version of Jenkins LTS prior to 1.642.2; or else a version
of Jenkins Enterprise that is 1.642.x.y prior to 1.642.2.1, 1.625.x.y
prior to 1.625.16.1, or 1.609.x.y prior to 1.609.16.1. It is,
therefore, affected by the following vulnerabilities :

  - An unspecified flaw exists in the Jenkins remoting
    module. An unauthenticated, remote attacker can exploit
    this to open a JRMP listener on the server hosting the
    Jenkins master process, allowing the execution of
    arbitrary code. (CVE-2016-0788)

  - A flaw exists in main/java/hudson/cli/CLIAction.java due
    to improper sanitization of CRLF sequences, which are
    passed via CLI command names, before they are included
    in HTTP responses. An unauthenticated, remote attacker
    can exploit this, via crafted Jenkins URLs, to carry out
    an HTTP response splitting attack. (CVE-2016-0789)

  - The verification of user-supplied API tokens fails to
    use a constant-time comparison algorithm. An
    unauthenticated, remote attacker can exploit this, via
    statistical methods, to determine valid API tokens,
    thus facilitating a brute-force attack to gain access
    to user credentials. (CVE-2016-0790)

  - The verification of user-supplied XSRF crumbs fails to
    use a constant-time comparison algorithm. An
    unauthenticated, remote attacker can exploit this, via
    statistical methods, to determine valid XSRF crumbs,
    thus facilitating a brute-force attack to bypass the
    cross-site request forgery protection mechanisms.
    (CVE-2016-0791)

  - A flaw exists in groovy.runtime.MethodClosure class due
    to unsafe deserialize calls of unauthenticated Java
    objects to the Commons Collections library. An
    authenticated, remote attacker can exploit this, by
    posting a crafted XML file to certain API endpoints, to
    execute arbitrary code. (CVE-2016-0792)");
  # https://wiki.jenkins.io/display/SECURITY/Jenkins+Security+Advisory+2016-02-24
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?bb7b4350");
  script_set_attribute(attribute:"see_also", value:"https://www.cloudbees.com/jenkins-security-advisory-2016-02-24");
  script_set_attribute(attribute:"see_also", value:"https://jenkins.io/changelog/");
  script_set_attribute(attribute:"see_also", value:"https://jenkins.io/changelog/-stable");
  # https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?9c6d83db");
  script_set_attribute(attribute:"solution", value:
"Upgrade Jenkins to version 1.650 or later, Jenkins LTS to version
1.642.2 or later, or Jenkins Enterprise to version 1.609.16.1 /
1.625.16.1 / 1.642.2.1 or later.");
  script_set_attribute(attribute:"agent", value:"all");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:ND");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-0788");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Jenkins XStream Groovy classpath Deserialization Vulnerability');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/01/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2016/02/24");
  script_set_attribute(attribute:"plugin_publication_date", value:"2016/03/14");

  script_set_attribute(attribute:"plugin_type", value:"combined");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:cloudbees:jenkins");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:jenkins:jenkins");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2016-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("jenkins_detect.nasl", "jenkins_win_installed.nbin", "jenkins_nix_installed.nbin", "macosx_jenkins_installed.nbin");
  script_require_keys("installed_sw/Jenkins");

  exit(0);
}

include('vcf.inc');
include('vcf_extras.inc');

var app_info = vcf::combined_get_app_info(app:'Jenkins');

var constraints = [
  { 'fixed_version' : '1.650',    'edition':'Open Source' },
  { 'fixed_version' : '1.642.2',  'edition':'Open Source LTS' },
  { 'min_version' : '1.609', 'fixed_version' : '1.609.16.1',  'edition':'Enterprise' },
  { 'min_version' : '1.625', 'fixed_version' : '1.625.16.1',  'edition':'Enterprise' },
  { 'min_version' : '1.642', 'fixed_version' : '1.642.2.1',   'edition':'Enterprise' },
  { 'min_version' : '1.609', 'fixed_version' : '1.609.16.1',  'edition':'Operations Center' },
  { 'min_version' : '1.625', 'fixed_version' : '1.625.16.1',  'edition':'Operations Center' }
];

vcf::jenkins::check_version_and_report(
  app_info:app_info,
  constraints:constraints,
  severity:SECURITY_HOLE
);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/jenkins_1_650.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\jenkins_1_650.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/jenkins_1_650.nasl

Go back to menu.

How to Run


Here is how to run the Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Jenkins < 1.642.2 / 1.650 and Jenkins Enterprise < 1.609.16.1 / 1.625.16.1 / 1.642.2.1 Multiple Vulnerabilities plugin ID 89925.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl jenkins_1_650.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a jenkins_1_650.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - jenkins_1_650.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state jenkins_1_650.nasl -t <IP/HOST>

Go back to menu.

References


CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 90011 - Fedora 22 : jenkins-1.609.3-6.fc22 / jenkins-remoting-2.53.3-1.fc22 (2016-0f490eea10)
  • 90014 - Fedora 23 : jenkins-1.625.3-3.fc23 / jenkins-remoting-2.53.3-1.fc23 (2016-641c8b4eb2)
  • 89725 - Jenkins < 1.642.2 / 1.650 Java Object Deserialization RCE
  • 89034 - Jenkins < 1.642.2 / 1.650 Java Object Deserialization RCE
  • 119370 - RHEL 7 : jenkins (RHSA-2016:0711)
  • 119378 - RHEL 6 : Red Hat OpenShift Enterprise 2.2.10 (RHSA-2016:1773)
  • 72685 - Jenkins < 1.551 / 1.532.2 and Jenkins Enterprise 1.509.x / 1.532.x < 1.509.5.1 / 1.532.2.2 Multiple Vulnerabilities
  • 78859 - Jenkins < 1.583 / 1.565.3 and Jenkins Enterprise 1.532.x / 1.554.x / 1.565.x < 1.532.10.1 / 1.554.10.1 / 1.565.3.1 Multiple Vulnerabilities
  • 111603 - Jenkins < 2.121.2 / 2.133 Multiple Vulnerabilities
  • 118147 - Jenkins < 2.138.2 (LTS) / 2.146 Multiple Vulnerabilities
  • 119500 - Jenkins < 2.138.4 LTS / 2.150.1 LTS / 2.154 Multiple Vulnerabilities
  • 127053 - Jenkins < 2.176.2 LTS / 2.186 Multiple Vulnerabilities
  • 130099 - Jenkins < 2.176.4 LTS / 2.197 Multiple Vulnerabilities
  • 139734 - Jenkins < 2.235.5 LTS / 2.243 Information Disclosure Vulnerability
  • 139726 - Jenkins < 2.235.4 LTS / 2.252 Multiple Cross-Site Scripting (XSS) Vulnerabilities
  • 148401 - Jenkins weekly < 2.280 Privilege Escalation
  • 148975 - Jenkins LTS < 2.277.3 / Jenkins weekly < 2.286
  • 151193 - Jenkins LTS < 2.289.2 / Jenkins weekly < 2.300 Multiple Vulnerabilities
  • 154055 - Jenkins LTS < 2.303.2 / Jenkins weekly < 2.315 Multiple Vulnerabilities
  • 156929 - Jenkins LTS < 2.319.2 / Jenkins weekly < 2.330 Multiple Vulnerabilities
  • 157860 - Jenkins LTS < 2.319.3 / Jenkins weekly < 2.334 Multiple Vulnerabilities
  • 99984 - Jenkins < 2.46.2 / 2.57 and Jenkins Enterprise < 1.625.24.1 / 1.651.24.1 / 2.7.24.0.1 / 2.46.2.1 Multiple Vulnerabilities
  • 153924 - Jenkins Git Plugin < 4.8.3 / Jenkins LTS < 2.303.2 / Jenkins weekly < 2.315 Multiple Vulnerabilities (Deprecated)
  • 97609 - Jenkins < 2.44 / 2.32.x < 2.32.2, Jenkins Operations Center < 1.625.22.1 / 2.7.22.0.1 / 2.32.2.1, and Jenkins Enterprise < 1.651.22.1 / 2.7.22.0.1 / 2.32.2.1 Multiple Vulnerabilities
  • 129169 - Jenkins Security Advisory 2019-01-08 Multiple Vulnerabilities
  • 155735 - Jenkins Plugins Multiple Vulnerabilities (Jenkins Security Advisory 2021-03-30)
  • 156930 - Jenkins plugins Multiple Vulnerabilities (2022-01-12)
  • 86898 - Jenkins < 1.638 / 1.625.2 Java Object Deserialization RCE
  • 155587 - Jenkins Enterprise and Operations Center < 2.249.31.0.1 / 2.277.3.1 DoS (CloudBees Security Advisory 2021-04-20)
  • 153977 - Jenkins Enterprise and Operations Center < 2.249.31.0.6 / 2.277.40.0.1 / 2.289.2.2 Multiple Vulnerabilities (CloudBees Security Advisory 2021-06-30)
  • 153890 - Jenkins Enterprise and Operations Center < 2.249.32.0.2 / 2.277.41.0.2 / 2.303.1.6 Multiple Vulnerabilities (CloudBees Security Advisory 2021-08-31)
  • 155661 - Jenkins Enterprise and Operations Center < 2.249.33.0.1 / 2.277.42.0.1 / 2.303.2.5 Multiple Vulnerabilities (CloudBees Security Advisory 2021-10-06)
  • 158092 - Jenkins Enterprise and Operations Center < 2.277.43.0.3 / 2.319.1.5 Multiple Vulnerabilities (CloudBees Security Advisory 2021-12-01)
  • 158059 - Jenkins Enterprise and Operations Center < 2.277.43.0.5 / 2.319.2.5 Multiple Vulnerabilities (CloudBees Security Advisory 2022-01-12)
  • 158672 - Jenkins Enterprise and Operations Center 2.277.x < 2.277.43.0.6 / 2.303.x < 2.303.30.0.5 / 2.319.3.3 Multiple DoS (CloudBees Security Advisory 2022-02-09)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file jenkins_1_650.nasl version 1.13. For more plugins, visit the Nessus Plugin Library.

Go back to menu.