CVE-2021-21684: XSS
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, resulting in a stored cross-site scripting (XSS) vulnerability.
Other sources
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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.jenkins-ci.plugins:gitto a version that resolves this vulnerability.Fixed in 4.8.3 - Upgrade
Upgrade
redhat/Git Pluginto a version that resolves this vulnerability.Fixed in 4.8.3 - Upgrade
Upgrade
Jenkins Git Pluginto a version that resolves this vulnerability.Fixed in 4.8.3Patch SECURITY-2499 - Compensating control
Restrict access to the `/git/notifyCommit` endpoint so only trusted parties can submit commit notifications, since the stored XSS is exploitable when attackers can craft notifications to that endpoint (Jenkins 2.314 and earlier, LTS 2.303.1 and earlier).
Event History
Frequently Asked Questions
What is the severity of CVE-2021-21684?
CVE-2021-21684 is classified as a medium severity vulnerability due to its potential for stored cross-site scripting (XSS) attacks.
How do I fix CVE-2021-21684?
To fix CVE-2021-21684, update the Jenkins Git Plugin to version 4.8.3 or later.
What versions of Jenkins Git Plugin are affected by CVE-2021-21684?
Jenkins Git Plugin versions 4.8.2 and earlier are affected by CVE-2021-21684.
What type of vulnerability is CVE-2021-21684?
CVE-2021-21684 is a stored cross-site scripting (XSS) vulnerability.
What causes CVE-2021-21684?
CVE-2021-21684 is caused by the failure to escape Git SHA-1 checksum parameters in build cause notifications.