CVE-2025-31720
Medium · 4.3Jenkins Missing Permission Check
CVSS
4.3
EPSS
0.4%
Published
Apr 2, 2025
CISA due date
—
Cloudanix analysis
A Jenkins user with limited permission to create build agents could copy an existing agent and see configuration details they were not supposed to access.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Jenkins 2.503 and earlier, and Jenkins LTS 2.492.2 and earlier, fail to enforce the required Computer/Extended Read authorization check on an HTTP endpoint used to copy an existing agent configuration. An authenticated user who has Computer/Create permission, but does not have Computer/Extended Read permission, can use the copy operation to duplicate an agent and thereby view or obtain configuration details they should not be allowed to access. The flaw is an authorization bypass with confidentiality impact; it does not by itself provide unauthenticated access, code execution, or administrative control.
Why it matters to the business
The main risk is unintended exposure of Jenkins agent configuration to lower-privileged users. Agent configuration can reveal infrastructure details such as node names, labels, launch methods, remote paths, connection parameters, tool locations, and credential references, which may help an insider or compromised low-privilege account map build infrastructure and plan further attacks. The public exploitation likelihood is currently low based on the provided EPSS score and there is no CISA KEV listing, but Jenkins often has high operational importance because it connects to source code, build systems, deployment pipelines, and secrets-handling workflows.
How an attack unfolds
An attacker first needs a valid Jenkins account or API token with Computer/Create permission. On a vulnerable Jenkins controller, the attacker submits a crafted request to the agent creation/copy endpoint, specifying that a new agent should be copied from an existing agent. Because the vulnerable endpoint checks whether the user may create a computer but fails to verify Computer/Extended Read access to the source agent, Jenkins permits the copy operation. The attacker can then inspect the newly created copied agent configuration that they own or can access through their granted create/manage workflow, exposing configuration details of the source agent that should have remained hidden. Those details can be used for reconnaissance, identifying sensitive build nodes, understanding deployment topology, or locating credential references for follow-on privilege escalation attempts.
How to fix it
Upgrade Jenkins controllers to Jenkins weekly 2.504 or later, or Jenkins LTS 2.492.3 or later. The upstream source fix is associated with jenkinsci/jenkins commit a5462bf4af2a2c56c46be70e98636ccf3a070bbd. If immediate upgrade is not possible, reduce exposure by reviewing and tightening permissions for users and groups with Computer/Create, restricting who can create agents, disabling unnecessary agent creation workflows, and ensuring low-privilege users do not have broad node-related permissions. Also review role-based access control matrices and plugin-based authorization strategies for unintended inheritance of Computer/Create.
How to confirm the fix worked
Confirm the Jenkins controller version is 2.504 or later for weekly releases, or 2.492.3 or later for LTS releases. Validate effective permissions by testing with a non-administrative account that has Computer/Create but not Computer/Extended Read: the account should not be able to copy an agent whose configuration it cannot read. Review the Manage Jenkins security configuration, authorization matrix, and role mappings to ensure Computer/Create is granted only to trusted users. Check whether newly created agents appear in the expected audit trail and whether copy operations are rejected without Computer/Extended Read on fixed versions.
Typical attack path
- Obtain or compromise a Jenkins user account with Computer/Create permission but without Computer/Extended Read permission.
- Identify existing Jenkins agents or infer agent names through permitted UI/API access, build logs, job labels, or error messages.
- Send an HTTP request to the Jenkins agent creation/copy endpoint to create a new agent using an existing agent as the source.
- Rely on the missing authorization check to bypass the intended Computer/Extended Read requirement on the source agent.
- Open or retrieve the copied agent configuration and review details such as labels, launch configuration, paths, connection settings, and credential references.
- Use the exposed configuration for internal reconnaissance or to support later attacks against CI/CD infrastructure.
How to detect it
Look for evidence of unexpected Jenkins agent copy activity by correlating Jenkins access logs, reverse proxy logs, Jenkins audit trail plugin logs if enabled, controller logs, and configuration file timestamps under the Jenkins nodes directory. Focus on authenticated POST requests to computer or node creation endpoints that include copy-mode parameters, especially from users with Computer/Create but without Computer/Extended Read. Review newly created agent directories and config.xml files for creation times after the vulnerability became known, and compare the creator or source IP against expected administrators or automation. In Jenkins controller logs and audit logs, look for node creation or configuration events followed by reads of the new node configuration by the same user. If suspicious activity is found, inspect whether copied configurations exposed sensitive agent paths, labels, launch methods, credential IDs, or connection settings, and determine whether those details were subsequently used in other Jenkins, SCM, deployment, or infrastructure access events.
- /computer/doCreateItem
- mode=copy
- from=
- POST /computer/doCreateItem
- /computer/*/config.xml
- /nodes/*/config.xml
- Computer/Create
- Computer/ExtendedRead
- copy an agent
- doCreateItem
What your security team should do
- Patch Jenkins controllers to 2.504 or later, or LTS 2.492.3 or later, during the next available maintenance window.
- Inventory Jenkins users, groups, service accounts, and API tokens with Computer/Create permission; remove the permission where it is not strictly required.
- Review whether any non-administrative users can create or manage agents, especially in shared CI/CD environments.
- Search Jenkins audit logs, access logs, and reverse proxy logs for agent copy operations performed by accounts that should not have had Computer/Extended Read access.
- Investigate recently created agents that were copied from existing agents, especially if created by low-privilege or unexpected users.
- Rotate or review credentials referenced by sensitive agent configurations if unauthorized copy activity is found.
- Add detection logic for POST requests to Jenkins computer creation endpoints using copy mode parameters.
- Where supported, enable or retain detailed Jenkins audit logging for node creation, node configuration changes, and permission-denied events.
The record
Jenkins 2.503 and earlier, LTS 2.492.2 and earlier does not perform a permission check in an HTTP endpoint. This allows attackers with Computer/Create permission but without Computer/Extended Read permission to copy an agent, gaining access to its configuration. Jenkins 2.504, LTS 2.492.3 requires Computer/Extended Read permission to copy an agent.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.jenkins-ci.main:jenkins-core | 0 | 2.492.3 |
| Maven | org.jenkins-ci.main:jenkins-core | 2.500 | 2.504 |
| Bitnami | jenkins | 0 | 2.492.3 |
| Chainguard | jenkins-2.462 | 0 | 0 |
| Chainguard | jenkins-2.479 | 0 | 0 |
| Chainguard | jenkins-2.479-compat | 0 | 0 |
| Chainguard | jenkins-2.479-remoting | 0 | 0 |
| Chainguard | jenkins-2.492 | 0 | 2.492.3-r4 |
| Wolfi | jenkins-2.479 | 0 | 0 |
| Wolfi | jenkins-2.479-compat | 0 | 0 |
| Wolfi | jenkins-2.479-remoting | 0 | 0 |
| maven | org.jenkins-ci.main/jenkins-core | 2.500 | 2.504 |
Related vulnerabilities
- GHSA-85h6-5m3v-gx37 Jenkins has a stored XSS vulnerability in node offline cause description Also affects org.jenkins-ci.main:jenkins-core
- GHSA-wfhp-qgm8-5p5c Jenkins has a build information disclosure vulnerability through Run Parameter Also affects org.jenkins-ci.main:jenkins-core
- CVE-2026-27099 Jenkins 2.483 through 2.550 (both inclusive), LTS 2.492.1 through 2.541.1 (both… Also affects org.jenkins-ci.main:jenkins-core
- CVE-2026-27100 Jenkins 2.550 and earlier, LTS 2.541.1 and earlier accepts Run Parameter values that… Also affects org.jenkins-ci.main:jenkins-core
- GHSA-6837-qgrc-x5p6 Jenkins has a CSRF vulnerability on the login form Also affects org.jenkins-ci.main:jenkins-core
- GHSA-9p56-p6mw-w8qc Jenkins has a Denial of service vulnerability in HTTP-based CLI Also affects org.jenkins-ci.main:jenkins-core
- GHSA-fxj7-6v9w-xc76 Jenkins's build authorization token is stored and displayed in plain text Also affects org.jenkins-ci.main:jenkins-core
- GHSA-hxjg-2jvf-h3rx Jenkins's build authorization token is stored and displayed in plain text Also affects org.jenkins-ci.main:jenkins-core