Redash SAML Authentication Bypass
Redash used a version of the pysaml2 library whose default backend lets a key embedded in a SAML message override the trusted key, so signature verification could be bypassed. An attacker could forge SAML messages from any identity provider and sign in as an administrator, gaining the highest privileges on the instance.
Calif, An Trinh, and Gia Bui
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the bundled pysaml2 version used xmlsec1, which by default prefers a key embedded in the message over the explicitly loaded trusted key, so forged messages passed signature checks.
Impact
Anyone could gain the highest possible privileges on the system; the text notes the fix had to be applied manually and that affected organisations treated it as critical.
What the attacker needed
Redash instance using SAML login; pysaml2 below 6.5.0; ability to reach the SAML endpoints
The fix
The official advisory recommends upgrading pysaml2 to version 6.5.0 or later, with switching to OAuth2 and rotating the cookie secret as defence in depth; no new Redash release with the fix existed at the time.
How it was found
- Observe a SAML login session to infer the identity provider's SAML Entity ID.
- Sign in over SAML with a non-existent email address so Redash creates an account via JIT provisioning.
- Use the user list in Settings to find an administrator's email address.
- Forge a SAML message for that administrator and submit it as an unsolicited response.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
SAML is a way for a website to trust a separate login service, and it relies on a digital signature to prove a login message really came from that service. Here the software checked the signature using a key that the attacker could supply inside the message itself, so anyone could write their own message and have it accepted. That let an attacker log in as an administrator without knowing any password.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.