Security context
LowGHSA-9h85-v6xf-h26q CVE-2015-1813CWE-79Published May 17, 2022

Jenkins allows Cross-Site Scripting (XSS)

Research this vulnerability

Research is free — Hunters explains how the bug works, the root-cause code pattern, how the fix addresses it, and how to test whether a target is affected, in chat. Investigate & write exploit is a paid run — the engine reads the advisory and fix commits, then builds and validates a working proof-of-concept exploit with reproduction steps.

Affected versions

1.597 → fixed in 1.6060 → fixed in 1.596.2

Details

Cross-site scripting (XSS) vulnerability in Jenkins before 1.606 and LTS before 1.596.2 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors, a different vulnerability than CVE-2015-1812.

The fix

[FIXED SECURITY-171]

Kohsuke Kawaguchi· Mar 7, 2015, 06:28 PM+11feb2703adb
core/src/main/java/hudson/util/FormValidation.java+1 1
@@ -196,7 +196,7 @@ private static FormValidation _error(Kind kind, Throwable e, String message) {
" <a href='#' class='showDetails'>"
+ Messages.FormValidation_Error_Details()
+ "</a><pre style='display:none'>"
- + Functions.printThrowable(e) +
+ + Util.escape(Functions.printThrowable(e)) +
"</pre>",kind
);
}

References