The vulnerability (CVE-2025-5279 / GHSA-r244-wg5g-6w2r) in the Amazon Redshift Python Connector was due to insecure default handling of SSL certificate validation for Identity Providers (IdPs). The core issue originated in the RedshiftProperty class, where the ssl_insecure parameter defaulted to True. The intended meaning of ssl_insecure=True, as clarified by the patch's documentation updates, was to disable SSL certificate verification against the IdP.
Consequently, when using IdP-based authentication plugins like BrowserAzureOAuth2CredentialsProvider (explicitly mentioned in the advisory), JwtCredentialsProvider, or SamlCredentialsProvider (implied by test additions in the patch), these plugins would inherit or use this ssl_insecure=True setting. Methods within these providers responsible for fetching tokens or assertions from the IdP would then make HTTPS requests without verifying the IdP's SSL certificate. This lack of validation exposed the token exchange process to man-in-the-middle (MitM) attacks, allowing an attacker to potentially intercept access tokens.
The patch addresses this by:
- Changing the default value of
ssl_insecure in redshift_connector.redshift_property.RedshiftProperty.__init__ from True to False. This makes SSL certificate verification for IdPs enabled by default.
- Adjusting the logic in helper methods like
redshift_connector.plugin.jwt_credentials_provider.JwtCredentialsProvider.do_verify_ssl_cert to correctly interpret the ssl_insecure flag (i.e., do_verify_ssl_cert should return True if verification is to be done, which corresponds to ssl_insecure being False).
The functions listed as vulnerable are either responsible for setting the insecure default (RedshiftProperty.__init__) or are the components that would act on this default to perform the insecure IdP communication (BrowserAzureOAuth2CredentialsProvider's token exchange method, and similar methods in other affected providers like JwtCredentialsProvider). During exploitation, a runtime profile would likely show activity within the specific credential provider's method that makes the unverified HTTPS call to the IdP.