CVE-2026-92125 in Script Security Plugin
Summary
by MITRE • 09/16/2026
Jenkins Script Security Plugin 1415.v9a_f9b_3a_c253d and earlier does not reject the @GroovyASTTransformationClass annotation, allowing attackers with permission to define and run sandboxed scripts, including Pipelines, to run an arbitrary AST transformation at compile time, bypassing the sandbox protection and executing arbitrary code in the context of the Jenkins controller JVM.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 09/16/2026
The vulnerability identified as CVE-2024-23897 represents a critical security flaw within the Script Security Plugin for Jenkins, specifically affecting versions 1415.v9a_f9b_3a_c253d and earlier. This plugin is fundamental to Jenkins' ability to execute Groovy scripts in a restricted environment known as the sandbox. The primary purpose of this sandbox is to prevent untrusted or partially trusted users from executing arbitrary code on the Jenkins controller, which could lead to full system compromise. However, the flaw lies in the failure of the script security mechanism to properly validate and reject specific annotations during the compilation phase of Groovy scripts. Specifically, the plugin does not block the @GroovyASTTransformationClass annotation, a feature that allows developers to define custom Abstract Syntax Tree transformations at compile time.
When an attacker with permission to define and run sandboxed scripts, such as those used in Jenkins Pipelines, utilizes this unchecked annotation, they can inject malicious code into the compilation process. Unlike runtime execution checks which are enforced by the security manager, AST transformations occur before the script is even executed. By leveraging @GroovyASTTransformationClass, an attacker can manipulate the structure of the Groovy source code itself during compilation. This manipulation allows them to bypass the sandbox restrictions entirely because the malicious logic is embedded into the compiled bytecode or generated classes before any runtime security checks are applied. Consequently, this results in the execution of arbitrary code within the context of the Jenkins controller Java Virtual Machine with elevated privileges.
The operational impact of this vulnerability is severe, as it effectively nullifies the primary defense mechanism against script injection attacks in Jenkins environments. An attacker who gains access to create or modify pipeline scripts can escalate their privileges from a limited user account to having full control over the Jenkins server. This level of access allows for the exfiltration of sensitive credentials stored in Jenkins, modification of build configurations to inject malware into software artifacts, and potentially pivoting to other systems within the network depending on the Jenkins configuration. The ability to execute arbitrary code at compile time means that traditional runtime monitoring tools may fail to detect the malicious activity until it is too late, as the payload is already compiled and integrated into the application logic.
From a classification perspective, this vulnerability aligns with CWE-94, which describes Improper Control of Generation of Code (Code Injection), specifically involving the manipulation of code generation processes through annotations or templates. It also relates to CWE-78, Improper Neutralization of Special Elements used in an OS Command, as the ultimate goal is often command execution on the host system. In terms of the MITRE ATT&CK framework, this exploit maps to T1059.004, Scripting: PowerShell or other scripting languages, and more specifically reflects techniques associated with Defense Evasion by bypassing application sandbox restrictions. The attack vector typically involves leveraging legitimate Jenkins features for malicious purposes, making it difficult to distinguish from normal administrative activity without deep inspection of script compilation logs.
Mitigation strategies must focus on immediate patching and enhanced monitoring. Administrators should upgrade the Script Security Plugin to version 1415.v9a_f9b_3a_c253d or later as soon as possible, where this specific annotation handling has been corrected to reject unsafe AST transformations by default. In environments where upgrading is not immediately feasible, strict access controls must be enforced to ensure that only highly trusted users can create and modify pipeline scripts. Additionally, enabling detailed logging for script compilation events can help in detecting attempts to use suspicious annotations or unusual patterns in Groovy code. Regular audits of installed plugins and adherence to the principle of least privilege are essential components of a robust security posture against such sophisticated bypass techniques.