Miggo Logo

CVE-2020-2279: Sandbox bypass vulnerability in Jenkins Script Security Plugin

10

CVSS Score
3.1

Basic Information

EPSS Score
0.5167%
Published
5/24/2022
Updated
12/14/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.jenkins-ci.plugins:script-securitymaven>= 1.67, < 1.751.75
org.jenkins-ci.plugins:script-securitymaven< 1.66.51.66.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper sandbox enforcement when handling return values from sandboxed scripts. The commit diff shows an upgrade to groovy-sandbox 1.27, which introduced proper interception of method calls on sandbox-defined objects. The added test case 'unsafeReturnValue' demonstrates that prior versions allowed invoking methods (like toString()) on objects created in sandboxed scripts without security checks. The core issue was in the interceptor logic (likely in SandboxInterceptor) that failed to apply sandbox protections to these cross-context method calls. The vulnerability is tied to the plugin's dependency on an outdated groovy-sandbox version (1.26), which lacked proper interception for return value processing.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

J*nkins S*ript S**urity Plu*in provi**s * s*n**ox ***tur* t**t *llows low privil**** us*rs to ***in* s*ripts, in*lu*in* Pip*lin*s, t**t *r* **n*r*lly s*** to *x**ut*. **lls to *o** ***in** insi** * s*n**ox** s*ript *r* int*r**pt**, *n* v*rious *llowl

Reasoning

T** vuln*r**ility st*ms *rom improp*r s*n**ox *n*or**m*nt w**n **n*lin* r*turn v*lu*s *rom s*n**ox** s*ripts. T** *ommit *i** s*ows *n up*r*** to `*roovy-s*n**ox` *.**, w*i** intro*u*** prop*r int*r**ption o* m*t*o* **lls on s*n**ox-***in** o*j**ts.