Jenkins has CRLF Injection Vulnerability in the CLI
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.643 → fixed in 1.6500 → fixed in 1.642.2
Details
CRLF injection vulnerability in the CLI command documentation in Jenkins before 1.650 and LTS before 1.642.2 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via unspecified vectors.
The fix
[FIX SECURITY-238] Don't echo command name
core/src/main/java/hudson/cli/CLIAction.java+1 −1
@@ -78,7 +78,7 @@ public void doCommand(StaplerRequest req, StaplerResponse rsp) throws ServletExcfinal String commandName = req.getRestOfPath().substring(1);CLICommand command = CLICommand.clone(commandName);if (command == null) {-rsp.sendError(HttpServletResponse.SC_NOT_FOUND, "No such command " + commandName);+rsp.sendError(HttpServletResponse.SC_NOT_FOUND, "No such command");return;}
References
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2016-0789
- WEBhttps://github.com/jenkinsci/jenkins/commit/f5c51fbad2b62b81dc1e0402aeee058a4a478046
- WEBhttps://access.redhat.com/errata/RHSA-2016:0711
- PACKAGEhttps://github.com/jenkinsci/jenkins
- WEBhttps://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2016-02-24
- WEBhttp://rhn.redhat.com/errata/RHSA-2016-1773.html