CVE-2020-2222: Stored XSS vulnerability in Jenkins 'keep forever' badge icon
8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.66365%
CWE
Published
5/24/2022
Updated
12/22/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.jenkins-ci.main:jenkins-core | maven | <= 2.235.1 | 2.235.2 |
org.jenkins-ci.main:jenkins-core | maven | >= 2.236, <= 2.244 | 2.245 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unescaped output in the Jelly template that generates the 'Keep this build forever' badge. The commit diff shows the fix added h.xmlEscape()
around build.whyKeepLog
, confirming this was the vulnerable point. The tooltip attribute construction in badge.jelly
was rendering raw user-controlled input (job name) into HTML without sanitization, creating an XSS vector. The test case in RunSEC1902Test.java
validates that job names containing HTML tags are now properly escaped.