Sigstore Python Cross-Site Request Forgery Vulnerability in OAuth Authentication
Vulnerability
A cross-site request forgery (CSRF) vulnerability has been identified in the OAuth authentication flow of sigstore-python, prior to version 4.2.0. The issue arises because the '_OAuthSession' component generates a unique 'state' parameter for authentication requests, but this 'state' is not validated against the response from the server. As a result, an attacker could potentially exploit this flaw by tricking a user into using an authorization code that they intercepted.
Impact
Exploitation of this vulnerability could allow a man-in-the-middle attacker to deceive a sigstore-python user into signing something with an identity controlled by the attacker. This could lead to confusion, but not serious harm.
Reproduction
To reproduce this vulnerability, initiate the OAuth authentication flow using sigstore-python version 4.1.0 or earlier. The '_OAuthSession' will generate a 'state' parameter and send it with the authentication request. However, when the server response is received, the 'state' parameter will not be cross-checked with the original value, creating a CSRF vulnerability.
Remediation
Users can upgrade to sigstore-python version 4.2.0 or later, where this vulnerability has been patched.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
