Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-2g4q-9vm9-9fw4: Jenkins Script Security Plugin sandbox bypass vulnerability

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.

ghsa
#vulnerability#git#java#maven
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. CVE-2024-34145

Jenkins Script Security Plugin sandbox bypass vulnerability

Moderate severity GitHub Reviewed Published May 2, 2024 to the GitHub Advisory Database • Updated May 3, 2024

Package

maven org.jenkins-ci.plugins:script-security (Maven)

Affected versions

< 1336.vf33a

Patched versions

1336.vf33a

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.

References

  • https://nvd.nist.gov/vuln/detail/CVE-2024-34145
  • https://www.jenkins.io/security/advisory/2024-05-02/#SECURITY-3341
  • http://www.openwall.com/lists/oss-security/2024/05/02/3

Published to the GitHub Advisory Database

May 2, 2024

Related news

Red Hat Security Advisory 2024-4597-03

Red Hat Security Advisory 2024-4597-03 - An update for OpenShift Jenkins is now available for Red Hat Product OCP Tools 4.15. Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link in the References section. Issues addressed include bypass and traversal vulnerabilities.