Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypassing AAL2 in Settings Flow Using Email OTP for Both Factors #4317

Open
4 of 5 tasks
AliAli1950 opened this issue Feb 21, 2025 · 0 comments
Open
4 of 5 tasks

Bypassing AAL2 in Settings Flow Using Email OTP for Both Factors #4317

AliAli1950 opened this issue Feb 21, 2025 · 0 comments
Labels
bug Something is not working.

Comments

@AliAli1950
Copy link

Preflight checklist

Ory Network Project

No response

Describe the bug

With the following configuration:
selfservice:
methods:
code:
mfa_enabled: true
flows:
settings:
required_aal: highest_available
A user who normally requires MFA to access settings ( has available_aal = aal2) can bypass the AAL2 requirement by using email OTP for both factors:
Start account recovery → receive an email OTP (recovery code) as the first factor.
Authenticate with that email OTP.
When prompted for MFA, use another email OTP (mfa email code) as the second factor.
Access the settings flow without providing a distinct second factor.
Questions
Is this expected behavior in Kratos when highest_available is used?
How can we prevent the same factor from being used twice to meet the AAL2 requirement?
Should Kratos enforce a distinct second factor for AAL2?

Reproducing the bug

(A user who normally requires MFA to access settings ( has available_aal = aal2))
Start account recovery → receive an email OTP (recovery code) as the first factor.
Authenticate with that email OTP.
When prompted for MFA, use another email OTP (mfa email code) as the second factor.
Access the settings flow without providing a distinct second factor.

Relevant log output

Relevant configuration

selfservice:
  methods:
    code:
      mfa_enabled: true
  flows:
    settings:
      required_aal: highest_available

Version

v1.3.1

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

@AliAli1950 AliAli1950 added the bug Something is not working. label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant