Summary
PLANKA does not sufficiently limit incorrect TOTP submissions to its verification endpoint, allowing repeated guesses against a six-digit two-factor authentication code. An attacker who already knows a user's password may reuse a pending verification token during its validity period and could obtain a full access token if a guess succeeds.
PLANKA does not sufficiently limit incorrect TOTP submissions to its verification endpoint, allowing repeated guesses against a six-digit two-factor authentication code. An attacker who already knows a user's password may reuse a pending verification token during its validity period and could obtain a full access token if a guess succeeds.
Affected context
The issue occurs in PLANKA deployments using TOTP-based two-factor authentication through the POST /api/access-tokens/verify-totp endpoint. Risk is present when incorrect-code attempts are not adequately throttled, delayed, limited, or invalidated, and an attacker can both authenticate with a user's password and access the associated pending verification token.
The issue occurs in PLANKA deployments using TOTP-based two-factor authentication through the POST /api/access-tokens/verify-totp endpoint. Risk is present when incorrect-code attempts are not adequately throttled, delayed, limited, or invalidated, and an attacker can both authenticate with a user's password and access the associated pending verification token.
Exploit preconditions
- Attack surface: The TOTP verification API endpoint
- Required access: A valid user's password and the ability to submit requests to the verification flow
- Trigger point: Repeated submission of incorrect six-digit TOTP codes
- Required token state: A pending verification token remains usable during its validity window
- Why exploitation is possible: The endpoint does not sufficiently restrict failed attempts, allowing repeated code guesses until one may be accepted
- Attack surface: The TOTP verification API endpoint
- Required access: A valid user's password and the ability to submit requests to the verification flow
- Trigger point: Repeated submission of incorrect six-digit TOTP codes
- Required token state: A pending verification token remains usable during its validity window
- Why exploitation is possible: The endpoint does not sufficiently restrict failed attempts, allowing repeated code guesses until one may be accepted
Why this happens
The underlying bug is insufficient enforcement of attempt limits around a security-sensitive authentication step. A TOTP verification endpoint that accepts repeated guesses without effective throttling, lockout, backoff, or token invalidation enables automated enumeration of the short code space. This behavior maps to CWE-307, which covers inadequate protection against repeated authentication attempts.
The underlying bug is insufficient enforcement of attempt limits around a security-sensitive authentication step. A TOTP verification endpoint that accepts repeated guesses without effective throttling, lockout, backoff, or token invalidation enables automated enumeration of the short code space. This behavior maps to CWE-307, which covers inadequate protection against repeated authentication attempts.
Potential impact
- An attacker may bypass the TOTP requirement for an account
- An attacker could obtain a full access token
- Compromised accounts may expose private data and application functions
- Attackers may modify account or project data
- The weakness can contribute to broader account takeover
- An attacker may bypass the TOTP requirement for an account
- An attacker could obtain a full access token
- Compromised accounts may expose private data and application functions
- Attackers may modify account or project data
- The weakness can contribute to broader account takeover
General mitigation guidance
Mitigation generally focuses on making authentication verification resistant
to repeated guessing.
Common defensive patterns include:
- Enforcing per-account, per-token, and per-client limits on failed TOTP attempts
- Applying progressive delays or temporary lockouts after repeated failures
- Invalidating pending verification tokens after a bounded number of attempts
- Using short, narrowly scoped verification-token lifetimes
- Binding pending authentication state to the intended account and session context
- Applying least privilege to issued access tokens and limiting token scope where possible
- Avoiding detailed error responses that help distinguish valid authentication state
Mitigation generally focuses on making authentication verification resistant
to repeated guessing.
Common defensive patterns include:
- Enforcing per-account, per-token, and per-client limits on failed TOTP attempts
- Applying progressive delays or temporary lockouts after repeated failures
- Invalidating pending verification tokens after a bounded number of attempts
- Using short, narrowly scoped verification-token lifetimes
- Binding pending authentication state to the intended account and session context
- Applying least privilege to issued access tokens and limiting token scope where possible
- Avoiding detailed error responses that help distinguish valid authentication state
How teams detect issues like this
Organizations can look for this weakness through:
- Static and dynamic analysis of authentication endpoints for missing attempt controls
- Code review checks for TOTP verification paths without counters, backoff, or token invalidation
- API tests that submit repeated invalid codes and verify that access is blocked or delayed
- Monitoring for bursts of failed verification requests across accounts, tokens, IP addresses, or devices
- Policy enforcement requiring rate limits and abuse controls on all authentication verification APIs
- Neutral automated security-review tooling that flags authentication flows lacking brute-force protections
Organizations can look for this weakness through:
- Static and dynamic analysis of authentication endpoints for missing attempt controls
- Code review checks for TOTP verification paths without counters, backoff, or token invalidation
- API tests that submit repeated invalid codes and verify that access is blocked or delayed
- Monitoring for bursts of failed verification requests across accounts, tokens, IP addresses, or devices
- Policy enforcement requiring rate limits and abuse controls on all authentication verification APIs
- Neutral automated security-review tooling that flags authentication flows lacking brute-force protections

