+
Skip to content

The state parameter is never validated #133

Closed as not planned
Closed as not planned
@ludovic-montel

Description

@ludovic-montel

Describe the bug

The Keycloak client uses the state OAuth 2.0 parameter, which is not mandatory but strongly recommended 👍.

I see in the client code that, when parsing the callback URL, it checks that the state parameter exists, but never checks if its value matches the one it generated at the beginning of the flow. I think this could lead to security vulnerability.

Could you please tell me if I'm right, and if so, fix this?

Thanks a lot!

Version

26.0.6

Expected behavior

If the client gets a response with a different state token than the one it initially generated, it should stop the authentication flow.

Actual behavior

If the client gets a response with a different state token than the one it initially generated, it continues with the authentication flow.

How to Reproduce?

Edit the state parameter that is returned by the server.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载