CVE-2026-135174 — Softaculous Virtualizor (3.2.9) — CWE-89
Softaculous Virtualizor before 3.2.9 contains an SQL injection vulnerability in enduser/auth_callback.php that allows unauthenticated attackers to bypass authentication via OAuth-returned email addresses. Attackers can register an OAuth provider account with an email containing SQL syntax to complete social login as the administrator account.
Softaculous Virtualizor before 3.2.9 contains an SQL injection vulnerability in enduser/auth_callback.php that allows unauthenticated attackers to bypass authentication via OAuth-returned email addresses. Attackers can register an OAuth provider account with an email containing SQL syntax to complete social login as the administrator account.
🎯 What is this vulnerability?
CVE-2026-135174 is a critical SQL Injection (CWE-89) vulnerability located in the OAuth callback handler of Softaculous Virtualizor. Specifically, the flaw resides in enduser/auth_callback.php.
The technical root cause is the failure to sanitize or parameterize the email attribute returned by an external OAuth provider during the social login process. When a user authenticates via a third-party OAuth provider (e.g., Google, Facebook, or a custom provider), Virtualizor receives the user's profile data, including their email address. The application then uses this email address directly in a SQL query to check if the user already exists in the local database or to create a new session.
Because the input is not properly escaped or bound as a parameter, an attacker can inject malicious SQL syntax into the email field. This allows the attacker to manipulate the logic of the SELECT or UPDATE statement. In this specific context, the injection allows the attacker to force the application to associate the OAuth session with the administrator account (or any other target account) instead of creating a new, low-privileged user account. This effectively bypasses the authentication mechanism by hijacking the identity verification logic.
Key Technical Flaws:
1. Untrusted Input: The email address from the OAuth provider is treated as trusted input.
2. Lack of Parameterization: The SQL query likely uses string concatenation (e.g., SELECT * FROM users WHERE email = '$email') rather than prepared statements.
3. Logic Bypass: The injection alters the query result to return the administrator's user ID, allowing the subsequent session creation logic to assign admin privileges to the attacker's session.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Fingerprinting: The attacker scans for Softaculous Virtualizor installations. Common indicators include: * HTTP headers containing
- Version Identification: The attacker attempts to identify the version. While Virtualizor may not explicitly display the version in the UI, the presence of the OAuth login button and the specific behavior of the callback endpoint can be probed. The CVE specifies vulnerability in versions before 3.2.9.
- OAuth Provider Setup: The attacker needs control over an OAuth provider. This can be: * A legitimate provider where the attacker registers an account with a malicious email (if the provider allows arbitrary email formats, which is rare but possible in some self-hosted or misconfigured providers). * More commonly, the attacker sets up a malicious OAuth provider (e.g., a self-hosted Keycloak, Auth0, or a custom OAuth2 server) that they control. They configure this provider to return a crafted email address when a user authenticates.
Server: Softaculous or similar.
* Presence of /enduser/ or /admin/ directories.
* Specific error messages or HTML structure unique to Virtualizor.
2. Exploitation
The attacker initiates the OAuth flow. The critical step is the callback where the malicious email is injected.Illustrative PoC (Conceptual):
Note: The exact SQL syntax depends on the database engine (MySQL/MariaDB is typical for Virtualizor) and the specific query structure. The following is an illustrative example of how the injection might work to bypass authentication.
Step 1: Attacker registers with their malicious OAuth provider.
The attacker ensures their OAuth provider returns an email address like:[email protected]' OR 1=1 --
Step 2: Attacker initiates login via Virtualizor.
The user (or the attacker themselves) clicks "Login with [Provider]".
Step 3: OAuth Callback.
The OAuth provider redirects the user to https://victim.com/enduser/auth_callback.php?code=...&state=....
Step 4: Server-Side Processing (Vulnerable Code Logic).
Inside auth_callback.php, the application fetches the user info from the OAuth provider. It receives the email: [email protected]' OR 1=1 -- .
The vulnerable PHP code might look like this (hypothetical):
$email = $oauth_user->getEmail(); // Returns: [email protected]' OR 1=1 --
$query = "SELECT id, username, password_hash FROM users WHERE email = '$email' LIMIT 1";
$result = $db->query($query);Step 5: SQL Injection Execution.
The resulting SQL query becomes:
SELECT id, username, password_hash FROM users WHERE email = '[email protected]' OR 1=1 -- ' LIMIT 1The OR 1=1 condition makes the WHERE clause always true. The -- comments out the rest of the query. The query returns the first user in the database, which is typically the administrator account (ID 1).
Step 6: Session Hijack.
The application retrieves the user ID (e.g., 1) and creates a session for that user. The attacker is now logged in as the administrator.
Curl Example (Illustrative):
Since the injection happens server-side based on the OAuth response, the attacker cannot directly send the SQL payload via a simple curl request to the callback endpoint unless they can control the OAuth token exchange. The attack is primarily client-side orchestrated via the malicious OAuth provider.
# 1. Attacker sets up malicious OAuth provider to return email: "[email protected]' OR 1=1 -- "
# 2. Attacker initiates login flow in browser
# 3. Browser redirects to malicious OAuth provider
# 4. Malicious provider authenticates and redirects back to Virtualizor with a valid code
# 5. Virtualizor exchanges code for token, gets malicious email, executes vulnerable query
# 6. Attacker is now logged in as admin3. Post-Exploitation
Once authenticated as the administrator: 1. Full Control of Virtualizor: The attacker gains access to the Virtualizor admin panel. 2. Server Compromise: Virtualizor is a server management panel. The attacker can: * Create, modify, or delete virtual machines (VMs). * Access the underlying host OS via the panel's terminal or file manager (if enabled). * Install malicious software on the host. * Exfiltrate data from all managed VMs. * Pivot to other internal networks if the host is connected to them. 3. Persistence: The attacker can create new admin accounts, modify firewall rules, or install rootkits to maintain access.🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade (Primary Fix)
2. Workarounds (If Immediate Upgrade is Not Possible)
Settings or Security.
enduser/auth_callback.php: Use a web server configuration (Nginx/Apache) to block direct access to the callback endpoint from untrusted IPs, or require additional authentication (e.g., IP whitelisting) for the callback. However, this may break legitimate OAuth flows.3. Detection & IoCs
GET /enduser/auth_callback.php?code=...&state=... followed by a successful login as the admin user.
* Check for multiple failed login attempts or unusual login patterns.
OR, UNION, SELECT, --).
* Sudden changes in admin account activity (e.g., new API keys, firewall rule changes).
OR 1=1 or other injection patterns in the users table queries.⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query