The Jenkins script console is a web based Groovy shell with access to the controller's runtime, so anyone who reaches it has effectively full control of the server. The documented record is clearest in the project's own handbook and security advisories, which we use below. We do not name victims, because we did not verify any.
What is the script console, in the project's own words?
The Jenkins handbook says the script console allows arbitrary Groovy scripts to run within the controller runtime or on agents. Access is controlled by the Administer permission. It says Groovy can create sub-processes and run arbitrary commands, read files the controller can access, and decrypt credentials configured in Jenkins. It adds that granting a normal user script console access is essentially the same as giving them administrator rights, that scripts can bypass security controls, and that changes made through scripts may not be audited in the normal logs.
The handbook says it was originally a debugging interface for developers that grew into a tool administrators use. It also says Jenkins and its agents should never run as root or a system administrator. Those are the defender takeaways in short.
A timeline of documented issues
This is not a list of breaches. It is three official advisories that show how access to powerful features is reached.
26 April 2017. A Jenkins security advisory fixed multiple cross site request forgery issues that let attackers trigger administrative actions by tricking a logged in victim into opening a web page. One listed item was creating a new agent, possibly executing arbitrary shell commands on the controller by choosing the appropriate launch method. The same advisory covered an unauthenticated remote code execution flaw in the remoting based command line interface (CVE-2017-1000353), and recommended disabling the remoting based CLI.
8 January 2019. An advisory (SECURITY-1266, CVE-2019-1003000 and related) described a way to circumvent the Script Security sandbox during script compilation. It allowed users with Overall/Read permission, or those who could control Jenkinsfile or sandboxed pipeline library content in source control, to execute arbitrary code on the controller. The fix was to update the Script Security, Pipeline: Groovy and Pipeline: Declarative plugins.
24 January 2024. An advisory (SECURITY-3314, CVE-2024-23897, rated Critical) described the built in CLI's argument parser replacing an at sign followed by a file path with the file's contents. Attackers with Overall/Read could read entire files from the controller file system, and attackers without it could read the first few lines. It affected weekly releases up to 2.441 and LTS up to 2.426.2, with fixes in 2.442 and LTS 2.426.3 or 2.440.1.
What should defenders learn?
The script console itself is documented behavior, not a bug. The risk is reaching it, or reaching something equivalent. Each advisory above is a different route to a similar outcome: execution on the controller, or access to its secrets. So defend the routes, not only the console.
What to do
- Restrict the Administer permission to a small named group and review it quarterly.
- Keep Jenkins and plugins current and subscribe to the project's security advisories.
- Do not expose the controller to the internet if you can avoid it, and put it behind authentication and network controls.
- Run builds on agents, not on the built-in node, and follow the handbook's controller isolation guidance.
- Never run Jenkins or agents as root.
- Keep credentials in the credentials store with narrow scope, and rotate them after any suspected exposure.
- Log administrative actions externally, since script changes may not appear in normal logs.
- After patching a critical advisory, assume secrets on that controller may have been read and rotate them.
Quick check
Should I disable the script console?
Many teams restrict who can reach it rather than removing it, since administrators use it for debugging. Whatever you choose, limit access tightly and log use outside Jenkins.
Was CVE-2024-23897 a script console flaw?
No. It was a file read flaw in the CLI's argument parsing. It is included because it shows another route to sensitive data on the controller.
Sources
- Jenkins User Handbook, Script Console
- Jenkins Securing Jenkins
- Jenkins Security Advisory 2017-04-26
- Jenkins Security Advisory 2019-01-08
- Jenkins Security Advisory 2024-01-24
Last reviewed: 18 October 2026.