/

CVE-2026-44460

Severity:

HIGH RISK

(7.4)

Authentication and Session Management in FileRise TOTP

CVE-2026-44460

Deferred

Vulnerability type

Category:

Authentication and Session Management

CWE:

CWE-200, CWE-287, CWE-306

Impact:

Multi-Factor Authentication Bypass and Account Compromise

Severity:

HIGH RISK

(7.4)

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 exposed users' existing TOTP secrets via the /api/totp_setup.php endpoint when invoked from a session that had only passed the password check.

An attacker who knows a victim's password could retrieve the live TOTP secret, generate valid one-time codes without the victim's device, and complete MFA verification to gain a fully authenticated session.

Affected context

This vulnerability affects FileRise instances using TOTP-based multi-factor authentication where:

  • Users authenticate with a password and then complete TOTP verification.
  • The /api/totp_setup.php endpoint is reachable in the "pending_login_user" state (password verified, TOTP not yet verified).
  • Existing TOTP configuration is not treated as a non-retrievable secret and is instead decrypted and reused during setup.

Under these conditions, an attacker who has learned a user's password can leverage the flawed setup flow to recover the user's TOTP secret.

Exploit preconditions

  • Attack surface: Application login/API flow, specifically /api/totp_setup.php and /api/totp_verify.php.
  • Required access:
  • Ability to establish a session that has successfully passed the password check (knowledge of the victim's password).
  • Network access to the FileRise web UI or API (typically over HTTPS).
  • Trigger point:
  • Invoke /api/totp_setup.php while the target account already has TOTP configured and the session state is pending_login_user.
  • Extract the TOTP secret from the QR PNG response.
  • Generate a one-time code and submit it to /api/totp_verify.php.
  • Why exploitation is possible:
  • The TOTP setup endpoint decrypts and returns the existing TOTP secret instead of refusing or generating a non-reusable value when MFA is already configured.
  • The TOTP secret is treated as recoverable data and exposed to the client during an intermediate authentication state, enabling reconstruction of valid TOTP codes.

Why this happens

The core issue is a failure to protect sensitive authentication secrets and to enforce proper access control on MFA configuration workflows.

The /api/totp_setup.php endpoint is callable from a partially authenticated state and, when TOTP is already configured, decrypts and re-uses the existing secret, embedding it in a QR PNG returned to the client.

This behavior aligns with:

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor — the TOTP seed, which should be treated as non-recoverable, is exposed to anyone who can reach this state.
  • CWE-287/CWE-306: Improper Authentication / Missing Authentication for Critical Function — accessing a critical function (MFA secret handling) without requiring full, second-factor verification.

Conceptually, the system conflates "password-verified" with "fully authenticated", and fails to enforce that TOTP enrollment and the TOTP secret itself must never be retrievable once set.

Potential impact

  • Full account takeover for any user whose password an attacker has obtained, even if TOTP is enabled.
  • Effective bypass of TOTP-based multi-factor authentication, negating its security benefits.
  • Persistence of access as long as the TOTP secret remains unchanged or not revoked.
  • Potential compromise of administrative or high-privilege accounts, depending on deployment.

General mitigation guidance

Mitigation patterns revolve around treating MFA secrets as non-recoverable credentials and hardening MFA-related workflows:

  • Design TOTP enrollment so that once a secret is configured, it is never decrypted or displayed again; instead, require re-enrollment with a new secret when necessary.
  • Ensure that any endpoint handling MFA secrets or setup is accessible only from a fully authenticated context and, where appropriate, requires an additional re-authentication (e.g., password re-entry plus existing second factor).
  • Implement strict server-side checks that distinguish between "login in progress" and "fully authenticated" and restrict sensitive operations to the latter.
  • Store TOTP secrets using secure storage mechanisms and interfaces that do not support direct retrieval by application clients.
  • Apply least privilege to API endpoints: design them to perform minimal necessary operations and never return raw secrets or equivalent material.

How teams detect issues like this

High-level detection approaches for similar flaws include:

  • Static analysis and code scanning:
  • Flag endpoints that read or decrypt MFA secrets and verify that no code paths return these values to clients.
  • Identify API routes callable from partially authenticated states that perform critical account or authentication operations.
  • Code review practices:
  • Review authentication and MFA workflow diagrams and code paths to ensure that each step has clearly defined authorization requirements.
  • Look for any functionality that exposes QR codes, keys, or tokens after initial setup and verify that it either rotates secrets or blocks access once configured.
  • Policy and testing:
  • Establish security requirements that MFA seeds and recovery materials are write-only from the client perspective.
  • Add integration tests that simulate a password-only session and verify that no MFA setup or secret-recovery endpoints can be used to obtain authentication material.
  • Automated review tools and SAST/DAST can be configured with rules to highlight responses containing patterns indicative of keys or seeds, especially in authentication-related paths.

Sources

SourceLink
github.comgithub.com/error311/FileRise/security/advisories/GHSA-84hw-8g73-v3f8

Frequently asked

questions

Yes, if an attacker can reach the FileRise login interface or API and already knows the victim's password, they can remotely exploit the TOTP setup flow to retrieve the secret and complete MFA.

The attacker must possess the victim's password and be able to establish a session in the "pending_login_user" state. They do not need access to the victim's authenticator device or any out-of-band channel.

Treat TOTP secrets as non-recoverable and ensure that once MFA is configured, the secret is never decrypted or returned to the client. Any re-setup should generate a new secret and require full, existing authentication to proceed.

Model authentication flows explicitly, enforce strict separation between partially and fully authenticated states, and apply a security design rule that secrets used for MFA or session protection are write-only from the perspective of clients and cannot be recovered via APIs.

Find out what's already
exploitable in your codebase.