Skip to content

Cross-Site Request Forgery in Jenkins

High severity GitHub Reviewed Published May 24, 2022 to the GitHub Advisory Database • Updated Mar 12, 2024

Package

maven org.jenkins-ci.main:jenkins-core (Maven)

Affected versions

<= 2.204.5
>= 2.205, <= 2.227

Patched versions

2.204.6
2.228

Description

An extension point in Jenkins allows selectively disabling cross-site request forgery (CSRF) protection for specific URLs.

Implementations of that extension point received a different representation of the URL path than the Stapler web framework uses to dispatch requests in Jenkins 2.227 and earlier, LTS 2.204.5 and earlier. This discrepancy allowed attackers to craft URLs that would bypass the CSRF protection of any target URL.

Jenkins now uses the same representation of the URL path to decide whether CSRF protection is needed for a given URL as the Stapler web framework uses.

In case of problems, administrators can disable this security fix by setting the system property hudson.security.csrf.CrumbFilter.UNPROCESSED_PATHINFO to true.

As an additional safeguard, semicolon (;) characters in the path part of a URL are now banned by default. Administrators can disable this protection by setting the system property jenkins.security.SuspiciousRequestFilter.allowSemicolonsInPath to true.

References

Published by the National Vulnerability Database Mar 25, 2020
Published to the GitHub Advisory Database May 24, 2022
Reviewed Jun 24, 2022
Last updated Mar 12, 2024

Severity

High
8.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVE ID

CVE-2020-2160

GHSA ID

GHSA-c735-g9f2-2mvp

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.