Skip to content

Seems to be vulnerable to some forms of browser swapping attacks #555

@tbroyer

Description

@tbroyer

See https://mailarchive.ietf.org/arch/msg/oauth/K8Wnw08GzPstyAQAh0JmSB47pOQ/, https://datatracker.ietf.org/doc/slides-124-oauth-sessa-browser-swapping/ and https://openid.net/specs/fapi-security-profile-2_0-final.html#name-browser-swapping-attacks

Specifically:

  • the openidc_authorization_response function, in case of state, iss or client_id (?) mismatch, errors out without calling the token endpoint, so the code is still valid (in case it's been somehow intercepted or exfiltrated by an attacker) and can be injected into another session
  • in the sample code in the README for how to use the module, in case of error, an error HTTP response is sent back, but this doesn't account for the specific error of a missing code, which can happen in a response mode downgrade attack where the response mode has been changed somehow by an attacker to fragment; in this case, the code might still be present in the URL, accessible in the browser, and exfiltrable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions