CVE-2020-2279: Script security Sandbox Bypass Vulnerability Vulnerability

CRITICAL
Advisory Identifier: GHSA-ccr8-4xr7-cgj3
CVSS 9.9
CWE-693
Published
Advisory Summary

CVE-2020-2279 is a CRITICAL (CVSS 9.9) sandbox bypass vulnerability vulnerability (CWE-693: Protection Mechanism Failure) affecting Script security libraries in the Maven ecosystem. The issue involves sandbox bypass vulnerability in jenkins script security plugin. Remediation is available by upgrading affected packages to version 1.75, 1.66.5.

CVE-2020-2279 at a Glance

CVE Identifier CVE-2020-2279
GHSA Identifier GHSA-ccr8-4xr7-cgj3
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Script security
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-2279

To remediate this vulnerability, upgrade all affected Script security dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.jenkins-ci.plugins:script-security fixed: 1.75
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>script-security</artifactId>
    <version>1.75</version>
</dependency>
org.jenkins-ci.plugins:script-security fixed: 1.66.5
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>script-security</artifactId>
    <version>1.66.5</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-2279, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

Analyze the terminal output to locate any version of Script security in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.75), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.jenkins-ci.plugins command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Script security, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Jenkins Script Security Plugin provides a sandbox feature that allows low privileged users to define scripts, including Pipelines, that are generally safe to execute. Calls to code defined inside a sandboxed script are intercepted, and various allowlists are checked to determine whether the call is to be allowed. In Script Security Plugin 1.75 and 1.66.5, any calls from outside a sandboxed script to code defined inside a sandboxed script were always allowed. As sandboxed scripts can communicate their results through script return values and similar mechanisms, this could result in code defined inside of a sandboxed script to be called without sandbox protection. This vulnerability allows attackers with permission to define and run sandboxed scripts, including Pipelines, to bypass the sandbox protection and execute arbitrary code in the context of the Jenkins controller JVM. Script Security Plugin 1.75 and 1.66.5 will prevent code defined inside a sandbox from being invoked outside a sandboxed script. In rare cases, invocations of sandboxed scripts may begin failing if the script return value or script binding include code defined in the sandbox and is further processed by the calling code. To resolve this issue, the affected values need to be converted inside the sandboxed script to a known safe type, such as `String`. For compatibility with this change, the following plugins should be upgraded to the versions specified: - [Email Extension Plugin](https://plugins.jenkins.io/email-ext) should be updated to version 2.77 or newer. - [Warnings Next Generation Plugin](https://plugins.jenkins.io/warnings-ng) should be updated to version 8.4.3 or newer. - [Warnings Plugin](https://plugins.jenkins.io/warnings) should be updated to version 5.0.2 or newer.

CVE-2020-2279 Affected Script security Versions

2 component(s)
Fixed Versions:
1.751.66.5
Product / Package Ecosystem Affected Versions Fixed Version
org.jenkins-ci.plugins:script-security
Maven
≥ 1.67
< 1.75
1.75
org.jenkins-ci.plugins:script-security
Maven
< 1.66.5
1.66.5

References

Frequently Asked Questions

What is CVE-2020-2279?
CVE-2020-2279 is a security vulnerability in Script security involving Sandbox bypass vulnerability in Jenkins Script Security Plugin under CWE-693: Protection Mechanism Failure.
Which Script security versions are affected?
Affected versions include releases prior to 1.75, 1.66.5 across affected packages: org.jenkins-ci.plugins:script-security.
What version fixes CVE-2020-2279?
Upgrading to 1.75, 1.66.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is script-security affected?
Yes, org.jenkins-ci.plugins:script-security is affected in releases prior to 1.75, 1.66.5. Upgrade your dependency to 1.75, 1.66.5 or later.
What is the CVSS score of CVE-2020-2279?
CVE-2020-2279 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2020-2279?
CVE-2020-2279 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check Maven dependencies for CVE-2020-2279?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jenkins-ci.plugins'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ccr8-4xr7-cgj3",
  "modified" : "2023-10-27T11:26:24Z",
  "published" : "2022-05-24T17:29:16Z",
  "aliases" : [ "CVE-2020-2279" ],
  "summary" : "Sandbox bypass vulnerability in Jenkins Script Security Plugin",
  "details" : "Jenkins Script Security Plugin provides a sandbox feature that allows low privileged users to define scripts, including Pipelines, that are generally safe to execute. Calls to code defined inside a sandboxed script are intercepted, and various allowlists are checked to determine whether the call is to be allowed.\n\nIn Script Security Plugin 1.75 and 1.66.5, any calls from outside a sandboxed script to code defined inside a sandboxed script were always allowed. As sandboxed scripts can communicate their results through script return values and similar mechanisms, this could result in code defined inside of a sandboxed script to be called without sandbox protection.\n\nThis vulnerability allows attackers with permission to define and run sandboxed scripts, including Pipelines, to bypass the sandbox protection and execute arbitrary code in the context of the Jenkins controller JVM.\n\nScript Security Plugin 1.75 and 1.66.5 will prevent code defined inside a sandbox from being invoked outside a sandboxed script.\n\nIn rare cases, invocations of sandboxed scripts may begin failing if the script return value or script binding include code defined in the sandbox and is further processed by the calling code. To resolve this issue, the affected values need to be converted inside the sandboxed script to a known safe type, such as `String`.\n\nFor compatibility with this change, the following plugins should be upgraded to the versions specified:\n- [Email Extension Plugin](https://plugins.jenkins.io/email-ext) should be updated to version 2.77 or newer.\n- [Warnings Next Generation Plugin](https://plugins.jenkins.io/warnings-ng) should be updated to version 8.4.3 or newer.\n- [Warnings Plugin](https://plugins.jenkins.io/warnings) should be updated to version 5.0.2 or newer.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:script-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.67"
      }, {
        "fixed" : "1.75"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:script-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.66.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-2279"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/script-security-plugin/commit/79d1e9207c5c359ca779b92f0a290e18c5e2387b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/CVEProject/cvelist/blob/16860a328d970faa6e4350b0fa446f64a52e52ca/2020/2xxx/CVE-2020-2279.json"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jenkinsci/script-security-plugin"
  }, {
    "type" : "WEB",
    "url" : "https://www.jenkins.io/security/advisory/2020-09-23/#SECURITY-2020"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/09/23/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-23T23:19:56Z",
    "nvd_published_at" : "2020-09-23T14:15:00Z"
  }
}