HIGH 8.8

CVE-2024-34145

Jenkins Script Security Plugin sandbox bypass vulnerability

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.

Multiple sandbox bypass vulnerabilities exist in Script Security Plugin 1335.vf07d9ce377a_e and earlier:

  • Crafted constructor bodies that invoke other constructors can be used to construct any subclassable type via implicit casts.

  • Sandbox-defined Groovy classes that shadow specific non-sandbox-defined classes can be used to construct any subclassable type.

These vulnerabilities allow 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.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.jenkins-ci.plugins » script-security
< 1336.vf33a
1336.vf33a

Blast radius

1affected artifacts
648affected versions
661dependent artifacts (est.)
65,953dependent versions

49% of the dependent artifacts (324) still pull an affected version in their latest release.

DepthDependent versions
Direct
16,003
2 hops
35,296
3 hops
11,640
4 hops
2,446
5 hops
385
6 hops
183

Most used dependents

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

Advisorynvd.nist.gov
Webjenkins.io
Webopenwall.com