Jenkins SAML Plugin allows bypassing CSRF protection for any URL
Date: 2022-05
Affected: maven/org.jenkins-ci.plugins:saml
Attack vector: deserialization
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2021-21677
CVE-2021-21678
CVE-2021-21680
CWE: CWE-352
CWE-502
CWE-611
CWE-693
CVSS: 8.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)

An extension point in Jenkins allows selectively disabling cross-site request forgery (CSRF) protection for specific URLs. SAML Plugin implements this extension point for the URL that users are redirected to after login. In Jenkins SAML Plugin 2.0.7 and earlier this implementation is too permissive, allowing attackers to craft URLs that would bypass the CSRF protection of any target URL.\n\nThis vulnerability was originally introduced in Jenkins SAML Plugin 1.1.3. Jenkins SAML Plugin 2.0.8 restricts which URLs it disables cross-site request forgery (CSRF) protection for to the one URL that needs it.


Mitigations:

Architectural layers (MAESTRO):