CVE-2020-2279
Sandbox bypass vulnerability in Jenkins Script Security Plugin
Description
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 should be updated to version 2.77 or newer.
- Warnings Next Generation Plugin should be updated to version 8.4.3 or newer.
- Warnings Plugin should be updated to version 5.0.2 or newer.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.jenkins-ci.plugins » script-security | < 1.66.5>= 1.67, < 1.75 | 1.66.5, 1.75 |
Blast radius
38% of the dependent artifacts (196) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 4,060 |
| 2 hops | 11,677 |
| 3 hops | 5,779 |
| 4 hops | 1,011 |
| 5 hops | 73 |
| 6 hops | 183 |
Most used dependents
- org.jenkins-ci.plugins.workflow » workflow-job470 usages
- org.jenkins-ci.plugins.workflow » workflow-cps439 usages
- org.jenkins-ci.plugins.workflow » workflow-basic-steps325 usages
- org.jenkins-ci.plugins.workflow » workflow-durable-task-step294 usages
- org.jenkins-ci.plugins » junit256 usages
- org.jenkins-ci.plugins.workflow » workflow-support253 usages
- org.jenkins-ci.plugins » git227 usages
- org.jenkins-ci.plugins » matrix-project204 usages
- org.jenkins-ci.plugins.workflow » workflow-aggregator136 usages
- org.jenkins-ci.plugins » token-macro134 usages
- org.jenkins-ci.plugins » mailer132 usages
- org.jenkins-ci.main » maven-plugin131 usages
- org.jenkins-ci.plugins.workflow » workflow-multibranch110 usages
- io.jenkins » configuration-as-code108 usages
- org.jenkins-ci.main » jenkins-test-harness99 usages
Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2020-2279 | nvd.nist.gov |
| Package | jenkinsci/script-security-plugin | github.com |
| Web | jenkinsci/script-security-plugin commit 79d1e92 | github.com |
| Web | CVEProject/cvelist CVE-2020-2279.json | github.com |
| Web | security/advisory/2020-09-23 | jenkins.io |
| Web | lists/oss-security/2020/09/23/1 | openwall.com |
