Two Factor Auth Security & Risk Analysis

wordpress.org/plugins/two-factor-auth

Secure WordPress login with Two Factor Auth. Users will have to enter an One Time Password when they log in.

10 active installs v4.4 PHP + WP 3.1.0+ Updated Jul 29, 2014
authauthenticateloginsecuritytwo-factor-auth
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Two Factor Auth Safe to Use in 2026?

Generally Safe

Score 85/100

Two Factor Auth has no known CVEs and is actively maintained. It's a solid choice for most WordPress installations.

No known CVEs Updated 11yr ago
Risk Assessment

The 'two-factor-auth' plugin version 4.4 exhibits a mixed security posture. On the positive side, it demonstrates good practices by exclusively using prepared statements for all its SQL queries and avoids external HTTP requests and file operations. Furthermore, its vulnerability history is clean, with no recorded CVEs, suggesting a generally well-maintained codebase. However, there are significant areas of concern identified in the static analysis. The plugin has a small but critical attack surface with one unprotected AJAX handler. While capability checks are present, the absence of nonce checks on this handler is a notable weakness. The taint analysis also revealed a flow with unsanitized paths, which could potentially lead to security issues if exploited, although no critical or high severity issues were flagged in this regard. The low percentage of properly escaped output (10%) is also a concern, as it indicates a high likelihood of cross-site scripting (XSS) vulnerabilities in various output contexts.

Key Concerns

  • AJAX handler without authentication check
  • Flow with unsanitized paths
  • Low percentage of properly escaped output
  • Missing nonce check on AJAX handler
Vulnerabilities
None known

Two Factor Auth Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Code Analysis
Analyzed Mar 16, 2026

Two Factor Auth Code Analysis

Dangerous Functions
0
Raw SQL Queries
0
6 prepared
Unescaped Output
37
4 escaped
Nonce Checks
0
Capability Checks
1
File Operations
0
External Requests
0
Bundled Libraries
0

SQL Query Safety

100% prepared6 total queries

Output Escaping

10% escaped41 total outputs
Data Flows
1 unsanitized

Data Flow Analysis

3 flows1 with unsanitized paths
tfaVerifyCodeAndUser (two-factor-login.php:40)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface
1 unprotected

Two Factor Auth Attack Surface

Entry Points1
Unprotected1

AJAX Handlers 1

noprivwp_ajax_tfa-init-otptwo-factor-login.php:36
WordPress Hooks 8
filterauthenticatetwo-factor-login.php:68
actionadmin_noticestwo-factor-login.php:97
actionadmin_menutwo-factor-login.php:224
actionadmin_inittwo-factor-login.php:228
actionlogin_enqueue_scriptstwo-factor-login.php:291
actionadmin_noticestwo-factor-login.php:317
actionadmin_inittwo-factor-login.php:323
actionadmin_menutwo-factor-login.php:326
Maintenance & Trust

Two Factor Auth Maintenance & Trust

Maintenance Signals

WordPress version tested3.9.40
Last updatedJul 29, 2014
PHP min version
Downloads14K

Community Trust

Rating92/100
Number of ratings22
Active installs10
Developer Profile

Two Factor Auth Developer Profile

oskarhane

1 plugin · 10 total installs

84
trust score
Avg Security Score
85/100
Avg Patch Time
30 days
View full developer profile
Detection Fingerprints

How We Detect Two Factor Auth

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/two-factor-auth/tfa_v4.3.4.js/wp-content/plugins/two-factor-auth/hotp-php-master/hotp.php/wp-content/plugins/two-factor-auth/Base32/Base32.php/wp-content/plugins/two-factor-auth/class.TFA.php/wp-content/plugins/two-factor-auth/admin_settings.php/wp-content/plugins/two-factor-auth/user_settings.php/wp-content/plugins/two-factor-auth/img/tfa_admin_icon_16x16.png
Script Paths
tfa_v4.3.4.js
Version Parameters
tfa_v4.3.4.js?ver=

HTML / DOM Fingerprints

HTML Comments
<!-- Database changes needed! --><!-- You need to initialize changes to the database for <strong>Two Factor Auth</strong> to work with the current version. --><!-- This is safe and will only have effect on values added by the <strong>Two Factor Auth</strong> plugin. --><!-- Click here to upgrade -->
Data Attributes
name="tfa_delivery_type"name="tfa_algorithm_type"name="tfa_user_roles_group"name="tfa_default_hmac_group"name="tfa_xmlrpc_status_group"name="tfa_email_group"+4 more
JS Globals
tfaSettings
REST Endpoints
/wp-json/two-factor-auth/v1/settings
FAQ

Frequently Asked Questions about Two Factor Auth