Skip to content
Noroxi
Research7 min read

AIOS 5.4.9: a 2FA bypass that checks the wrong account

AIOS 5.4.9 validates the 2FA code against an account id taken from the login request, not the user whose password passed — a CWE-287 bypass.

Noroxi TeamPenetration testing and security consulting

Abstract. Two-factor authentication is only as strong as the link between the first factor and the second. The Simba TFA engine shipped with All-In-One Security (AIOS) 5.4.9 breaks that link: it validates the one-time code against an account identifier read straight from the login request, not against the account whose password just succeeded. What follows is the root cause and a defensive analysis for site owners and developers. The vendor has been notified under coordinated disclosure, and the operational proof of concept stays out of this write-up until a fix ships — enough here to understand the bug class, nothing you can run.

Keywords: WordPress security; two-factor authentication bypass; improper authentication; CWE-287; CWE-308; Simba TFA; secure coding; least privilege.

1. Introduction

All-In-One Security (AIOS) – WP Security & Firewall runs on more than 1,000,000 WordPress sites. One of its features is two-factor authentication (2FA), handled by a bundled engine called Simba TFA. People turn 2FA on for one scenario above all: the attacker already has the password — from phishing, credential reuse, or a breach — and the stolen password alone should no longer be enough to log in.

The flaw described here defeats that scenario directly. When the second factor is not tied firmly to the identity the first factor proved, the whole control drops back to single-factor authentication (CWE-308). Any developer who writes step-up or multi-factor checks can make the same mistake, because it is subtle and easy to repeat. The issue is fresh and unpatched as of this writing; it was confirmed by code review and reproduced in an isolated localhost lab.

2. Affected component

PluginAll-In-One Security (AIOS) – WP Security & Firewall — slug all-in-one-wp-security-and-firewall
Tested version5.4.9 (plugin file header; readme Stable tag: 5.4.10)
Active installations1,000,000+
Vulnerability typeTwo-Factor Authentication bypass / Improper Authentication
CWECWE-287 Improper Authentication / CWE-308 Use of Single-factor Authentication
Required privilegeUnauthenticated attacker who holds the victim's password and has any account on the site with 2FA enabled (self-service)
User interactionNone
CVSS 3.1~7.1 (High) AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
StatusFresh. Confirmed in code and reproduced on a localhost lab on AIOS 5.4.9 (re-verified 2026-10-05)

Version 5.4.9 is the release that fixed the unrelated CVE-2026-96825 (a CWE-290 subscriber control-bypass). The 2FA bypass here is a distinct, still-unpatched issue confirmed on that post-patch build.

3. Technical analysis: the second factor checks the wrong account

The Simba TFA engine validates the one-time code on WordPress's authenticate filter (tfaVerifyCodeAndUser, hooked at priority 99999999999 — includes/simba-tfa/simba-tfa.php:142), so it fires on every login once the password has been checked. The problem is whose 2FA secret the submitted code is checked against. Instead of binding that identity to the user whose password just succeeded, the engine reads it from an attacker-controlled POST field, creds_user_id.

php
// tfaVerifyCodeAndUser()  (runs on 'authenticate' after password check)$params = stripslashes_deep($_POST);            // includes attacker-controlled creds_user_id$params['log'] = $user->user_login;             // $user = the WP_User whose PASSWORD validated (the victim)$code_ok = $this->authorise_user_from_login($params, $may_be_email);
// authorise_user_from_login()$user_id = <resolved from $params['log']>;       // = victim...// DEFECT: the account whose 2FA is checked comes from the REQUEST, not from the verified principal$tfa_creds_user_id = !empty($params['creds_user_id']) ? $params['creds_user_id'] : $user_id;if ($tfa_creds_user_id != $user_id) {    // the ONLY guard: the chosen account must itself have 2FA active — trivially true for the attacker's own account    if (!$this->is_activated_for_user($tfa_creds_user_id) || !$this->is_activated_by_user($tfa_creds_user_id)) {        return new WP_Error(...);  // blocked    }}return $this->get_controller('totp')->check_code_for_user($tfa_creds_user_id, $user_code);  // checks the chosen account's TOTP

The password check fixes a principal, the victim. The second-factor check then runs against whatever account id arrived in the request body. Its one guard is that the chosen account also has 2FA enabled, which guards nothing, because anyone can enable 2FA on an account they own. One factor proves the victim, the other proves the attacker, both report success, and the session is handed to the victim.

The field looks like support for "log in to account B with account A's credentials" integrations. The mistake is that on the normal login path it trusts creds_user_id from the request and never confirms the id belongs to the account whose credentials were actually used.

4. How the flaw is reached (conceptual)

Reaching the sink needs no special access and no exploit toolkit, only an understanding of the mechanism, which is why the binding has to be fixed at the source.

WordPress validates the password first; the 2FA engine then runs on the authenticate filter to check the second factor before a session is granted. Normally both checks concern the same account. Here the second check takes its subject from a client-controlled request field, while the first check's subject is the account whose password verified. Someone who already holds the victim's password has cleared the first factor as the victim. Point the second-factor check at a different account, one whose second factor they legitimately control, and they clear the second factor as themselves while the session still belongs to the victim.

Every precondition is self-service. Enabling 2FA on your own account is a normal, supported action, and adding extra login fields takes nothing more than a standard HTTP client. There is no privilege escalation, no race, no memory corruption, only two authentication checks that are allowed to name two different identities. The exact field values, request ordering, and any reproduction commands are left out on purpose; defenders need the mechanism, not a recipe.

5. Impact: full 2FA bypass and account takeover

The outcome is a complete bypass of AIOS two-factor authentication. An attacker who holds the victim's password — the exact situation 2FA exists to cover — logs in as the victim by validating the second factor against their own 2FA-enabled account. That takes over any 2FA-protected account, administrators included, and with it the site.

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N (~7.1, High) describes a network-reachable, low-complexity flaw with no user interaction and high impact to confidentiality and integrity. PR:L reflects the attacker's own low-privilege account; because the attack also assumes knowledge of the victim's password, a triager may adjust the score for that precondition. The practical consequence does not change: the backstop a site owner counted on against password compromise does not hold.

6. Remediation

Bind the second-factor check to the principal the first factor established:

php
// Verify 2FA for the user whose credentials were actually validated — never a request-supplied id.$tfa_creds_user_id = $user->ID;   // the WP_User returned by the password check
// If a "different-credentials" integration genuinely must be supported, derive the target// account server-side from the authenticated principal, and REQUIRE that the account whose// password succeeded is the same account whose second factor is being checked:if (!empty($params['creds_user_id']) && (int) $params['creds_user_id'] !== (int) $user->ID) {    return new WP_Error('tfa_identity_mismatch', 'Second factor must belong to the authenticated user.');}
return $this->get_controller('totp')->check_code_for_user($tfa_creds_user_id, $user_code);

Update to a fixed release as soon as the vendor publishes one. Until then, treat any account whose password may have leaked as exposed despite 2FA, and reset passwords for high-privilege accounts first. The same engine ships in more than one product, so confirm that whichever plugin supplies your 2FA is the corrected build.

7. Detection and hardening for site owners

Measures that follow directly from the mechanics above:

  • Watch for successful logins whose session user differs from the login context. An authentication log that shows a 2FA-protected account logging in without the second-factor challenge you would expect for it is worth investigating.
  • Apply least privilege. Fewer high-privilege accounts means fewer accounts whose takeover is catastrophic. Review your administrator and editor rosters and drop dormant ones.
  • Reduce exposure of the login endpoint. Rate-limiting and IP allow-listing on wp-login.php, and keeping administration behind a VPN or SSO where you can, raise the cost of any credentialed attack.
  • Virtual patching / WAF. A web application firewall can reject login requests that carry unexpected account-identifier parameters, as a temporary measure until the official fix lands. It is a stop-gap, not a cure; the real fix is server-side identity binding.
  • Keep plugins updated and subscribe to the vendor's security advisories so the corrected release goes on promptly.
  • Password hygiene still counts. The attack assumes a stolen password, so unique strong passwords and monitoring for credential reuse shrink the victim pool regardless of the 2FA flaw.

8. Broader lesson

The principle is simple and travels well: every factor in a multi-factor check must bind to the same proven identity, and that identity must come from the server's own verification, never from a field the client can set. Whenever a second factor, a step-up challenge, or a re-authentication hangs off an identifier supplied in the request, ask whether an attacker could point it at a different account they control. If they can, the control has quietly dropped to single-factor (CWE-308). Authorization decisions belong to the authenticated principal, not to request parameters that merely claim an identity.

9. Responsible disclosure

This research follows coordinated disclosure. The vendor has been notified privately, and the full operational proof of concept — exact parameters, request ordering, and reproduction commands — stays out of this public write-up until a fix is available. We will coordinate publication timing with the vendor and request a CVE.

All testing ran in an isolated, localhost-bound lab against the public GPL plugin. No third-party systems were touched, and the test environment and accounts were removed afterward. Noroxi conducts authorized security research only; we never test systems we do not own or have explicit permission to assess.

References


Published for defensive and educational purposes. Noroxi LLC conducts authorized security research only; operational exploit detail is withheld until a fix is available.

Exploited this week · every Monday

New KEV entries, fresh PoCs, WordPress triage and what to do this week. No account needed.

Your address is used only for this email and never shared.

Up next

PublishPress Capabilities Privilege Escalation (Missing Authorization)