Summary
An authentication bypass vulnerability in MISP's mixed LDAP and OTP setup allows sessions to be established before the OTP challenge is enforced.
In deployments using plugin-based authentication with mandatory OTP, an attacker with valid primary credentials can log in via the plugin and directly browse to another URL, gaining full access without completing the OTP step.
Affected context
This vulnerability appears in MISP instances that:
- Enable plugin-based authentication such as LDAP (e.g.,
LdapAuth.mixedAuth=true) - Configure OTP as mandatory (e.g.,
Security.require_otp=true) - Rely on the normal login flow to present and enforce OTP challenges
- Allow plugin authentication to run during an early application hook (e.g.,
beforeFilter)
In such configurations, a user's authenticated session can be created before any OTP check runs, as long as the request path does not explicitly enforce the OTP step.
Exploit preconditions
- Attack surface: Web application login endpoints and other authenticated URLs exposed over HTTP(S).
- Required access: Knowledge of valid primary authentication credentials for a target account (e.g., LDAP username/password or equivalent plugin-backed credentials).
- Trigger point: Logging in via the plugin-backed authentication flow when mixed authentication and OTP enforcement are enabled, and then navigating directly to another application URL instead of completing the OTP page.
- Why exploitation is possible: The application establishes the authenticated session during the early filter phase, before verifying whether OTP is required or completed, so subsequent requests may be treated as fully authenticated without any second factor.
Why this happens
The underlying issue is an improper authentication state transition where partial authentication (primary factor via plugin) is incorrectly treated as full authentication.
Mapping to CWE-287 (Improper Authentication), the design allows the authentication plugin to create a session in the beforeFilter lifecycle step without a corresponding check that OTP has been satisfied. The login flow fails to distinguish between:
- A user who has passed only the primary factor, and
- A user who has completed all required factors (including OTP).
This insecure pattern stems from not centralizing the enforcement of authentication requirements and failing to gate session establishment on the completion of all configured authentication factors.
Potential impact
- An attacker with stolen or guessed primary credentials can bypass OTP and gain full access as the victim user.
- Compromise of sensitive data accessible within the MISP instance, including threat intelligence and indicators.
- Unauthorized changes to configuration, sharing settings, or event data within the platform.
- Escalation of impact if compromised accounts hold administrative or high-privilege roles.
- Undermining of organizational multi-factor authentication policies and trust assumptions.
General mitigation guidance
Effective mitigation focuses on ensuring that sessions are only established after all required authentication factors are verified and that plugin-based flows cannot short-circuit OTP enforcement.
Common defensive patterns include:
- Centralizing authentication state handling so that any login mechanism (core or plugin-based) must pass through a unified OTP enforcement step before the session is fully established.
- Treating primary-factor authentication as a transient state and marking users as "partially authenticated" until OTP completion, with access to other application URLs blocked in this state.
- Implementing a strict post-authentication policy that checks OTP requirements immediately after plugin authentication and before assigning full session privileges.
- Configuring authentication plugins to respect global MFA policies rather than establishing sessions independently of OTP logic.
- Applying the principle of least privilege for partially authenticated sessions, ensuring they cannot access normal application routes or sensitive resources.
How teams detect issues like this
Detection and assurance strategies can focus on both code and behavior:
- Static analysis and code review:
- Identify locations where sessions are created or user identities are attached to requests (e.g., in
beforeFilteror middleware). - Flag any code paths in authentication plugins that set session state or logged-in status without consulting centralized OTP/MFA checks.
- Review control flow to ensure that OTP checks cannot be conditionally skipped for any authentication mechanism.
- Runtime and behavioral checks:
- Add logging around authentication transitions, marking events when users are:
- Initially authenticated via plugins
- Redirected to OTP challenges
- Granted full sessions after OTP completion
- Monitor for patterns where OTP-required users gain session cookies but never hit OTP endpoints.
- Policy and automated checks:
- Enforce architectural policies that all authentication mechanisms integrate with a shared MFA enforcement layer.
- Use automated security tests (e.g., integration or regression suites) that simulate logging in via each plugin and confirm OTP is always required when configured.

