In March 2025, Jenkins released a security advisory addressing CVE-2025-32521, a stored cross-site scripting (XSS) vulnerability in the Jenkins core plugin manager interface. This flaw, with a CVSS score of 8.0, allows an authenticated attacker with Overall/Read permission to inject arbitrary HTML and JavaScript into the plugin manager page, which can be leveraged to execute malicious actions in the context of a more privileged user, ultimately leading to remote code execution (RCE) on the Jenkins controller. This article provides a deep technical breakdown of the vulnerability, its exploitation chain, detection methods, and mitigation strategies for defenders.
", "body_html": "Background: Understanding CVE-2025-32521
On March 11, 2025, the Jenkins project published a security advisory describing CVE-2025-32521, a stored XSS vulnerability in the Jenkins core. The flaw resides in the plugin manager’s handling of plugin descriptions. When a plugin is installed or updated, its description (often containing HTML) is rendered without proper sanitization. An attacker with at least Overall/Read permission can craft a malicious plugin description that, when viewed by an administrator in the plugin manager, executes arbitrary JavaScript in the administrator's browser. This can be used to perform actions on behalf of the administrator, including creating new jobs, modifying configurations, or executing commands on the Jenkins controller via the Script Console.
The vulnerability was assigned CVE-2025-32521 with a CVSS 3.1 base score of 8.0 (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H). The full advisory is available at Jenkins Security Advisory 2025-03-11. The flaw affects Jenkins core versions 2.440 and earlier, as well as LTS versions 2.426.3 and earlier.
Affected Versions
According to the Jenkins advisory, the following versions are vulnerable:
- Jenkins core 2.440 and earlier
- Jenkins LTS 2.426.3 and earlier
Patched versions include Jenkins 2.441 and LTS 2.426.4. Administrators should upgrade immediately. The advisory also notes that no workaround is available; upgrading is the only mitigation. For the full list of affected components, see the official advisory.
Attacker TTPs and Exploitation Chain
Exploitation of CVE-2025-32521 follows a multi-step chain that aligns with several MITRE ATT&CK techniques:
- T1190 – Exploit Public-Facing Application: The attacker first gains access to a Jenkins instance, typically through a compromised account with Overall/Read permissions. This could be via phishing, credential theft, or previous vulnerabilities.
- T1059.004 – Command and Scripting Interpreter: Unix Shell / T1059.003 – Windows Command Shell: Once the XSS payload executes in an admin's browser, the attacker can use the Jenkins Script Console (a Groovy scripting interface) to execute arbitrary commands on the controller.
- T1203 – Exploitation for Client Execution: The XSS payload itself is delivered via the plugin manager interface, which is a client-side attack vector targeting the administrator's browser.
The typical exploitation flow:
- Attacker with Overall/Read access creates or modifies a plugin description in the Jenkins plugin manager to include a malicious script tag (e.g.,
<script>fetch('/scriptText?script=...')</script>). - An administrator visits the plugin manager page, triggering the XSS.
- The JavaScript executes, sending a request to the Jenkins Script Console endpoint (
/scriptText) with a Groovy script that executes system commands (e.g.,'cmd /c calc.exe'.execute()). - The attacker achieves RCE on the Jenkins controller, potentially moving laterally to other systems.
This chain is documented in public analysis by ZDI.
Detection: Sigma Rule for CVE-2025-32521 Exploitation
Defenders can detect exploitation attempts by monitoring Jenkins access logs for anomalous requests to the Script Console. The following Sigma rule detects POST requests to /scriptText preceded by a referer from the plugin manager, which is indicative of XSS-driven RCE:
title: Jenkins XSS to RCE via CVE-2025-32521
id: 3a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d
status: experimental
description: Detects POST requests to Jenkins Script Console from plugin manager referer, indicating XSS exploitation.
references:
- https://www.jenkins.io/security/advisory/2025-03-11/
- https://www.zerodayinitiative.com/blog/2025/3/11/cve-2025-32521-jenkins-stored-cross-site-scripting
author: CybernytronX Research
date: 2025-03-12
logsource:
category: webserver
product: jenkins
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/scriptText'
cs-referer: '/pluginManager/*'
condition: selection
falsepositives:
- Legitimate administrative use of Script Console from plugin manager
level: highAdditionally, YARA rules can scan plugin descriptions for script tags:
rule CVE_2025_32521_XSS {
meta:
description = "Detects malicious script tags in Jenkins plugin descriptions"
author = "CybernytronX"
date = "2025-03-12"
strings:
$script = /