CVE-2021-21684: XSS

Published Oct 6, 2021
·
Updated

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

3 affected componentsFixes available
maven/org.jenkins-ci.plugins:git<=4.8.2
4.8.3
redhat/Git Plugin<4.8.3
4.8.3
jenkins Git Jenkins<=4.8.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.jenkins-ci.plugins:git to a version that resolves this vulnerability.

    Fixed in 4.8.3
  2. Upgrade

    Upgrade redhat/Git Plugin to a version that resolves this vulnerability.

    Fixed in 4.8.3
  3. Upgrade

    Upgrade Jenkins Git Plugin to a version that resolves this vulnerability.

    Fixed in 4.8.3Patch SECURITY-2499
  4. 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

Oct 6, 2021
CVE Published
via MITRE·10:10 PM
Data Sourced
via MITRE·10:10 PM
Description
Oct 7, 2021
Data Sourced
via Red Hat·07:18 PM
DescriptionSeverityAffected Software
May 24, 2022
Advisory Published
07:16 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

How do I fix CVE-2021-21684?

To fix CVE-2021-21684, update the Jenkins Git Plugin to version 4.8.3 or later.

3

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.

4

What type of vulnerability is CVE-2021-21684?

CVE-2021-21684 is a stored cross-site scripting (XSS) vulnerability.

5

What causes CVE-2021-21684?

CVE-2021-21684 is caused by the failure to escape Git SHA-1 checksum parameters in build cause notifications.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203