Am I affected?

type your samly version to check

Description

Insufficient Verification of Data Authenticity vulnerability in dropbox samly allows an attacker to establish an authenticated session using a SAML response the service provider never requested.

Samly.SPHandler.validate_authresp/3 in lib/samly/sp_handler.ex validates a SAML response for the SP-initiated flow by comparing only the RelayState value, the IdP identifier, and the presence of a target URL held in the session. It never compares SubjectConfirmationData/@InResponseTo against the ID of the AuthnRequest the service provider issued, and that request ID is never persisted, so no comparison is possible. SAML 2.0 Core section 4.1.4.3 requires a service provider to reject a response whose InResponseTo does not match a request it made. The underlying esaml library checks status, signature, recipient, audience, and staleness, but likewise never inspects InResponseTo, so nothing else closes the gap. Exploitation requires a validly signed assertion from the trusted IdP, which an attacker can obtain for their own account, and a RelayState matching the victim's session; the assertion signature itself remains intact, so this is not a signature-forgery issue.

This issue affects samly: from 0.3.0 onward.

Weaknesses & attack patterns

Weakness

CWE-345 · Insufficient Verification of Data Authenticity in catalog → MITRE ↗

Attack patterns

CAPEC-62 · Cross Site Request Forgery MITRE ↗

Affected — Hex / samly Hex.pm ↗ Repository ↗

0.3.0 and up affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:dropbox:samly:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Samly.SPHandler'
source files lib/samly/sp_handler.ex
routines 'Elixir.Samly.SPHandler':consume_signin_response/1

Affected — GitHub / dropbox/samly Repository ↗

8a5bb1b and up affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:dropbox:samly:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Samly.SPHandler'
source files lib/samly/sp_handler.ex
routines 'Elixir.Samly.SPHandler':consume_signin_response/1

Affected — GitHub / handnot2/samly Repository ↗

8a5bb1b and up affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:handnot2:samly:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Samly.SPHandler'
source files lib/samly/sp_handler.ex
routines 'Elixir.Samly.SPHandler':consume_signin_response/1

References

Credits

Mark Madsen Reporter
Jonatan Männchen / EEF Coordinator

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
« All CVEs