Bug 2278820 (CVE-2024-34144) - CVE-2024-34144 jenkins-plugin/script-security: sandbox bypass via crafted constructor bodies
Summary: CVE-2024-34144 jenkins-plugin/script-security: sandbox bypass via crafted con...
Keywords:
Status: NEW
Alias: CVE-2024-34144
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2278825
TreeView+ depends on / blocked
 
Reported: 2024-05-03 08:12 UTC by TEJ RATHI
Modified: 2024-07-17 18:47 UTC (History)
5 users (show)

Fixed In Version: Script Security Plugin 1336.vf33a_a_9863911
Doc Type: If docs needed, set a value
Doc Text:
A sandbox bypass vulnerability was found in the Jenkins Script Security Plugin involving crafted constructor bodies, enabling the circumvention of security restrictions. With crafted constructor bodies, this flaw allows authenticated attackers to define and execute sandboxed scripts, including Pipelines, bypassing sandbox protection mechanisms and executing arbitrary code within the context of the Jenkins controller JVM. The Script Security Plugin features a sandbox functionality designed to enable users with limited privileges to create scripts, including Pipelines, which are generally safe for execution. This security mechanism intercepts calls within sandboxed scripts, referencing various allowlists to decide whether these calls should be permitted. The vulnerabilities that allow for sandbox bypass have been identified in versions up to 1335.vf07d9ce377a_e of the Script Security Plugin. These vulnerabilities include: - Exploiting crafted constructor bodies that trigger other constructors, thereby allowing the construction of any subclassable type through implicit casts. - Utilizing Groovy classes defined within the sandbox that overshadow certain non-sandboxed classes, facilitating the creation of any subclassable type. These vulnerabilities enable attackers, who have the permission to create and execute sandboxed scripts including Pipelines, to circumvent sandbox protections and execute arbitrary code within the context of the Jenkins controller JVM. The fixed version of this script incorporates enhanced restrictions and sanity checks. These improvements ensure that calls to super constructors are intercepted by the sandbox, including: - Ensuring that calls to other constructors via 'this' are now appropriately managed within the sandbox. - No longer overlooking classes in packages that may be overshadowed by Groovy-defined classes when intercepting super constructor calls.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:3634 0 None None None 2024-06-05 14:44:43 UTC
Red Hat Product Errata RHSA-2024:3635 0 None None None 2024-06-05 14:45:17 UTC
Red Hat Product Errata RHSA-2024:3636 0 None None None 2024-06-05 14:44:05 UTC
Red Hat Product Errata RHSA-2024:4597 0 None None None 2024-07-17 18:47:18 UTC

Description TEJ RATHI 2024-05-03 08:12:54 UTC
A sandbox bypass vulnerability involving crafted constructor bodies in Jenkins Script Security Plugin 1335.vf07d9ce377a_e and earlier 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.

http://www.openwall.com/lists/oss-security/2024/05/02/3
https://www.jenkins.io/security/advisory/2024-05-02/#SECURITY-3341

Comment 2 errata-xmlrpc 2024-06-05 14:44:04 UTC
This issue has been addressed in the following products:

  OCP-Tools-4.13-RHEL-8

Via RHSA-2024:3636 https://access.redhat.com/errata/RHSA-2024:3636

Comment 3 errata-xmlrpc 2024-06-05 14:44:42 UTC
This issue has been addressed in the following products:

  OCP-Tools-4.14-RHEL-8

Via RHSA-2024:3634 https://access.redhat.com/errata/RHSA-2024:3634

Comment 4 errata-xmlrpc 2024-06-05 14:45:16 UTC
This issue has been addressed in the following products:

  OCP-Tools-4.12-RHEL-8

Via RHSA-2024:3635 https://access.redhat.com/errata/RHSA-2024:3635

Comment 5 errata-xmlrpc 2024-07-17 18:47:17 UTC
This issue has been addressed in the following products:

  OCP-Tools-4.15-RHEL-8

Via RHSA-2024:4597 https://access.redhat.com/errata/RHSA-2024:4597


Note You need to log in before you can comment on or make changes to this bug.