CVE-2023-39151: XSS
Jenkins 2.415 and earlier, LTS 2.401.2 and earlier does not sanitize or properly encode URLs in build logs when transforming them into hyperlinks, resulting in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to control build log contents.
Other sources
Jenkins applies formatting to the console output of builds, transforming plain URLs into hyperlinks. Jenkins 2.415 and earlier, 2.414 and earlier, and LTS 2.401.2 and earlier does not sanitize or properly encode URLs of these hyperlinks in build logs. This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to control build log contents. Jenkins 2.416, 2.414.1, and LTS 2.401.3 encodes URLs of affected hyperlink annotations in build logs.
Jenkins weekly and LTS are vulnerable to cross-site scripting, caused by improper validation of user-supplied input. A remote authenticated attacker could exploit this vulnerability to inject malicious script into a Web page which would be executed in a victim's Web browser within the security context of the hosting Web site, once the page is viewed. An attacker could use this vulnerability to steal the victim's cookie-based authentication credentials.
— IBM
Affected Software
Event History
Frequently Asked Questions
What is CVE-2023-39151?
CVE-2023-39151 is a vulnerability in Jenkins 2.415 and earlier, 2.414 and earlier, and LTS 2.401.2 and earlier that allows stored cross-site scripting (XSS) attacks through unsanitized URLs in build logs.
What is the severity of CVE-2023-39151?
CVE-2023-39151 has a severity score of 8, indicating a high severity.
How does CVE-2023-39151 affect Jenkins?
CVE-2023-39151 affects Jenkins versions 2.415 and earlier, 2.414 and earlier, and LTS 2.401.2 and earlier.
What is the CWE ID of CVE-2023-39151?
CVE-2023-39151 is associated with CWE-79 (Cross-site Scripting).
How can I mitigate CVE-2023-39151?
To mitigate CVE-2023-39151, it is recommended to update Jenkins to version 2.416, 2.414.1, or 2.401.3, which contain the necessary fixes.