CVE-2021-21684
Stored XSS vulnerability in Jenkins Git Plugin
Description
Jenkins Git Plugin 4.8.2 and earlier does not escape the Git SHA-1 checksum parameters provided to commit notifications when displaying them in a build cause.
This results in a stored cross-site scripting (XSS) vulnerability exploitable by attackers able to submit crafted commit notifications to the /git/notifyCommit endpoint.
Jenkins Git Plugin 4.8.3 rejects Git SHA-1 checksum parameters that do not match the expected format. Existing values are sanitized when displayed on the UI.
This vulnerability is only exploitable in Jenkins 2.314 and earlier, LTS 2.303.1 and earlier. See the LTS upgrade guide.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.jenkins-ci.plugins » git | < 4.8.3 | 4.8.3 |
Blast radius
53% of the dependent artifacts (95) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 4,643 |
| 2 hops | 6,060 |
| 3 hops | 239 |
Most used dependents
- org.jenkins-ci.plugins.workflow » workflow-aggregator136 usages
- org.jenkins-ci.plugins.workflow » workflow-scm-step104 usages
- org.jenkins-ci.plugins » github-branch-source48 usages
- com.coravy.hudson.plugins.github » github22 usages
- org.jenkins-ci.plugins » cloudbees-bitbucket-branch-source21 usages
- io.jenkins.blueocean » blueocean-rest-impl12 usages
- io.jenkins.blueocean » blueocean-pipeline-api-impl9 usages
- org.jenkins-ci.plugins » git-server8 usages
- io.jenkins.plugins » gitlab-branch-source7 usages
- com.groupon.jenkins-ci.plugins » DotCi6 usages
- com.sonyericsson.hudson.plugins.gerrit » gerrit-trigger6 usages
- io.jenkins.blueocean » blueocean-events4 usages
- io.jenkins.plugins » git-forensics4 usages
- org.jenkins-ci.plugins » github-oauth4 usages
- org.jenkins-ci.plugins » github-organization-folder4 usages
Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2021-21684 | nvd.nist.gov |
| Package | jenkinsci/git-plugin | github.com |
| Web | jenkinsci/git-plugin commit 5474cc9 | github.com |
| Web | security/advisory/2021-10-06 | jenkins.io |
| Web | lists/oss-security/2021/10/06/1 | openwall.com |
