/

CVE-2026-103977

Severity:

HIGH RISK

(8.1)

TOTP Brute-Force (CWE-307) in FileRise Login Handler

CVE-2026-103977

Deferred

Vulnerability type

Category:

Improper Authentication Attempt Restriction

CWE:

CWE-307, CWE-841

Impact:

Potential account takeover through extended online TOTP guessing

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/error311/FileRise/commit/cc1118923b522baff28dca05bdd79c27f984c68a
github.comgithub.com/error311/FileRise/releases/tag/v3.23.0
github.comgithub.com/error311/FileRise/security/advisories/GHSA-4hfj-6478-5cv7

Frequently asked

questions

Yes, it can be exercised through the web-based login flow when the attacker can submit repeated TOTP attempts. Exploitation still depends on possessing the target account's valid primary credential.

No. The weakness involves restarting authentication in a new session, so access to an existing authenticated session is not the key requirement.

Enforce TOTP failure limits with durable, account-scoped state that remains effective across sessions, login restarts, and relevant client changes.

Test authentication controls across session boundaries, review counter-reset logic, monitor distributed guessing patterns, and require centralized policy enforcement for online second-factor attempts.

Yes, it can be exercised through the web-based login flow when the attacker can submit repeated TOTP attempts. Exploitation still depends on possessing the target account's valid primary credential.

No. The weakness involves restarting authentication in a new session, so access to an existing authenticated session is not the key requirement.

Enforce TOTP failure limits with durable, account-scoped state that remains effective across sessions, login restarts, and relevant client changes.

Test authentication controls across session boundaries, review counter-reset logic, monitor distributed guessing patterns, and require centralized policy enforcement for online second-factor attempts.

Find out what's already
exploitable in your codebase.