The vulnerability stems from missing authorization checks in three distinct functions within the Jenkins MCP Server Plugin. The analysis of the patch commit 59de6a268b4c6844a3a9c6c55a541de183e71a97 clearly shows the addition of permission checks in the triggerBuild, getStatus, and getJobScm methods.
-
In DefaultMcpServer.java, the triggerBuild function lacked a check to verify if the user had Item.BUILD permission, allowing users with only read access to trigger jobs. The patch rectifies this by adding job.checkPermission(Item.BUILD);.
-
In the same file, the getStatus function unconditionally exposed a list of configured clouds. The patch wraps this logic in an if (Jenkins.get().hasAnyPermission(Jenkins.SYSTEM_READ)) block, restricting this information to users with sufficient privileges (equivalent to the advisory's mention of Overall/Read).
-
In JobScmExtension.java, the getJobScm function returned SCM configuration details without verifying Item.EXTENDED_READ permission. The patch introduces an if (job.hasPermission(Item.EXTENDED_READ)) condition to ensure only authorized users can access this sensitive information.
These changes directly correspond to the vulnerabilities described in the advisory, confirming that these three functions were the points of failure.