CVE-2026-136835 in Script Security Plugin
Summary
by MITRE • 11/25/2026
Jenkins Script Security Plugin 1436.v1082791135e4 and earlier does not reject @Builder annotations whose builderStrategy member names an arbitrary class when the annotation is referred to using a partially qualified class name, allowing attackers with permission to define and run sandboxed scripts, including Pipelines, to execute code outside the sandbox if a suitable class is present on the classpath of the component that evaluates the script.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/28/2026
The Jenkins Script Security Plugin version 1436.v1082791135e4 and earlier contains a critical security flaw related to the handling of Groovy @Builder annotations within sandboxed execution environments. This vulnerability stems from an insufficient validation mechanism when processing class names that are referenced using partially qualified identifiers rather than fully qualified ones. In standard Java and Groovy development, builders are often used to simplify object construction by allowing fluent API calls. The Script Security Plugin is designed to enforce strict restrictions on what code can run within a sandboxed context to prevent unauthorized actions. However, the flaw allows an attacker who has permission to define and execute scripts in this restricted environment to bypass these controls under specific conditions involving how class names are resolved during annotation processing.
The technical core of the issue lies in the logic used to determine whether a builder strategy is permitted. When a script utilizes the @Builder annotation with a custom builderStrategy, the plugin must verify that the specified class is safe for execution within the sandbox. The vulnerability arises when this verification process fails to properly normalize or fully qualify partially named classes before checking them against an allowlist of trusted packages and classes. If an attacker specifies a builder strategy using a short name like MyBuilder instead of com.example.MyBuilder, and if a maliciously crafted class with that simple name exists on the component's classpath, the security check may incorrectly pass or fail to reject it as unauthorized. This misalignment between the reference used in the script and the internal resolution logic creates an opening for sandbox escape.
The operational impact of this vulnerability is severe because it enables privilege escalation within the Jenkins environment. An attacker with access to create and run scripted pipelines, which are common in continuous integration and delivery workflows, can exploit this flaw to execute arbitrary code outside the protective boundaries of the script security sandbox. This effectively grants the attacker the same level of control as a user with administrative privileges on the Jenkins instance. They could potentially read sensitive configuration files, access credentials stored in Jenkins credential stores, modify build configurations, or even gain shell access depending on how Jenkins is deployed and what other services are running alongside it. The risk is heightened because many organizations rely heavily on scripted pipelines for automation, making this a high-value target for adversaries seeking to compromise CI/CD infrastructure.
This vulnerability aligns with CWE-20 Improper Input Validation, as the system fails to adequately validate the class name provided in the annotation before allowing its use. It also relates to CWE-749 Exposed Dangerous Method or Function if the builder strategy invokes methods that are restricted by the sandbox policy but slip through due to the naming ambiguity. From a threat modeling perspective using MITRE ATT&CK, this behavior facilitates Defense Evasion techniques where an adversary bypasses security restrictions to maintain persistence or escalate privileges within the system. The specific technique involves abusing legitimate language features and configuration options to circumvent access controls, which is characteristic of advanced persistent threats targeting enterprise automation tools.
Mitigation strategies should focus on immediate patching and rigorous input validation practices. Administrators running affected versions must upgrade the Script Security Plugin to a version where this logic has been corrected to ensure that all class references are fully qualified or strictly validated against an allowlist regardless of how they are written in the source code. In addition to updating software, organizations should review their Jenkins security settings and restrict script approval permissions to only those users who absolutely require them. Implementing least privilege principles for pipeline scripts can limit the blast radius if a similar vulnerability is discovered in the future. Regular audits of approved sandboxed scripts and monitoring for unusual execution patterns are also recommended to detect potential exploitation attempts early.