Summary
FileRise contains an authentication rate-limiting weakness that allows failed TOTP attempts to be reset by starting the login workflow in a new session. An attacker who already has a valid primary credential may continue guessing the account's second factor beyond the intended five-attempt limit.
FileRise contains an authentication rate-limiting weakness that allows failed TOTP attempts to be reset by starting the login workflow in a new session. An attacker who already has a valid primary credential may continue guessing the account's second factor beyond the intended five-attempt limit.
Affected context
The issue occurs in FileRise authentication flows that use session-local state to track failed TOTP verification attempts. It becomes risky when the application does not maintain a durable, account-wide limit across newly created login sessions and an attacker has obtained the corresponding primary credential.
The issue occurs in FileRise authentication flows that use session-local state to track failed TOTP verification attempts. It becomes risky when the application does not maintain a durable, account-wide limit across newly created login sessions and an attacker has obtained the corresponding primary credential.
Exploit preconditions
- Attack surface: FileRise web login and pending-login TOTP verification handlers
- Required access: A valid username and primary authentication credential for a target account
- Trigger point: Repeated failed TOTP submissions followed by restarting authentication in a new session
- Why exploitation is possible: Failed-attempt state is stored in
$_SESSION, so a new session can restore the available TOTP attempt allowance instead of enforcing a durable account-wide limit
- Attack surface: FileRise web login and pending-login TOTP verification handlers
- Required access: A valid username and primary authentication credential for a target account
- Trigger point: Repeated failed TOTP submissions followed by restarting authentication in a new session
- Why exploitation is possible: Failed-attempt state is stored in
$_SESSION, so a new session can restore the available TOTP attempt allowance instead of enforcing a durable account-wide limit
Why this happens
The underlying bug is improper restriction of repeated authentication attempts. FileRise tracked failed TOTP submissions only within an individual session, while the intended security policy required the limit to follow the account across login restarts. This maps primarily to CWE-307: Improper Restriction of Excessive Authentication Attempts and is also related to CWE-841: Improper Enforcement of Behavioral Workflow, because the authentication workflow did not consistently enforce its intended attempt-control behavior.
The underlying bug is improper restriction of repeated authentication attempts. FileRise tracked failed TOTP submissions only within an individual session, while the intended security policy required the limit to follow the account across login restarts. This maps primarily to CWE-307: Improper Restriction of Excessive Authentication Attempts and is also related to CWE-841: Improper Enforcement of Behavioral Workflow, because the authentication workflow did not consistently enforce its intended attempt-control behavior.
Potential impact
- An attacker could continue online TOTP guessing beyond the intended threshold
- Successful guessing could lead to unauthorized account access
- Sensitive files and account-managed content may be exposed or modified
- Compromised accounts could be used for further attacks against other users or systems
- An attacker could continue online TOTP guessing beyond the intended threshold
- Successful guessing could lead to unauthorized account access
- Sensitive files and account-managed content may be exposed or modified
- Compromised accounts could be used for further attacks against other users or systems
General mitigation guidance
Mitigation generally focuses on enforcing authentication-attempt limits at the account or identity level rather than relying solely on session state.
Common defensive patterns include:
- Track failed second-factor attempts using durable, account-scoped controls
- Apply rate limits consistently across sessions, devices, and login restarts
- Use bounded lockouts, progressive delays, or risk-based verification without creating denial-of-service weaknesses
- Invalidate or reset counters only through well-defined trusted authentication events
- Protect authentication state from client-controlled modification
- Apply least privilege to authenticated accounts and require stronger controls for sensitive operations
Mitigation generally focuses on enforcing authentication-attempt limits at the account or identity level rather than relying solely on session state.
Common defensive patterns include:
- Track failed second-factor attempts using durable, account-scoped controls
- Apply rate limits consistently across sessions, devices, and login restarts
- Use bounded lockouts, progressive delays, or risk-based verification without creating denial-of-service weaknesses
- Invalidate or reset counters only through well-defined trusted authentication events
- Protect authentication state from client-controlled modification
- Apply least privilege to authenticated accounts and require stronger controls for sensitive operations
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis and code review checks for authentication counters stored only in per-session state
- Review of all second-factor handlers for account-wide rate limiting and reset behavior
- Tests that repeat failed TOTP attempts across newly created sessions
- Monitoring for repeated failed TOTP submissions distributed across sessions or source addresses
- Policy enforcement requiring durable, centralized controls for online authentication throttling
Automated security review tools may help identify session-only counters and missing cross-session enforcement, but behavioral testing is useful for validating the complete login workflow.
Organizations can look for this weakness through:
- Static analysis and code review checks for authentication counters stored only in per-session state
- Review of all second-factor handlers for account-wide rate limiting and reset behavior
- Tests that repeat failed TOTP attempts across newly created sessions
- Monitoring for repeated failed TOTP submissions distributed across sessions or source addresses
- Policy enforcement requiring durable, centralized controls for online authentication throttling
Automated security review tools may help identify session-only counters and missing cross-session enforcement, but behavioral testing is useful for validating the complete login workflow.

