Executive brief
Samly is a library used to integrate SAML single sign-on authentication into applications. A vulnerability in its SAML response validation allows an attacker to hijack a victim's authenticated session by replaying a SAML response from the trusted identity provider without verifying the response matches a specific login request. This could allow unauthorized access to accounts without knowing passwords.
Technical details
The vulnerability is an insufficient verification of data authenticity in Samly's SPHandler.validate_authresp/3 function. The code validates SAML responses by checking RelayState, IdP identifier, and session target URL, but fails to verify that the SubjectConfirmationData/@InResponseTo attribute matches the ID of the AuthnRequest originally issued by the service provider. SAML 2.0 Core section 4.1.4.3 mandates this check to prevent response replay attacks. Exploitation requires a validly signed SAML assertion from the trusted IdP (obtainable using the attacker's own account) and knowledge of a victim's RelayState session value. The underlying esaml library also does not verify InResponseTo, closing no alternative validation path. No patch information is currently available.
Affected products
- Dropbox Samly 0.3.0 and later
Timeline
- 2026-08-20: disclosed