Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as WordPress Editor
-
DeliveryPOST crafted SQL payload as array key in `_gallery_order_{post_id}`
-
Exploit`gllr_save_postdata()` stores unsanitized key into post meta
-
ExecutionTrigger gallery data retrieval to execute stored SQL
-
ImpactExtract wp_users table or other sensitive database records
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated WordPress session with Editor role or higher (corresponding to CVSS PR:H). The vulnerability is triggered specifically by submitting a POST request to the gallery post-save endpoint that processes |
| Impact | The CVSS 7.2 (High) score reflects the full database impact (C:H/I:H/A:H) but is tempered by PR:H, requiring Editor-level WordPress access - a role that typically requires administrative delegation and is not self-registerable in default WordPress configurations. This substantially limits opportunistic exploitation; the realistic threat model is a malicious insider, a compromised Editor account, or a scenario where another vulnerability (e.g., credential stuffing, phishing) first establishes Editor access. No EPSS score was provided, and the vulnerability has no CISA KEV listing, suggesting no observed mass exploitation at time of analysis. The absence of a listed POC and KEV status, combined with the PR:H requirement, places real-world priority below what the raw CVSS score might suggest for most environments. However, for WordPress sites with multiple Editors or contributor workflows, the risk is elevated. CVSS I:H/A:H impact metrics are consistent with blind or error-based SQLi that can perform write operations or trigger heavy queries, not only read access. |
| Exploit ScenarioDerived | An attacker who holds or has compromised a WordPress Editor account navigates to a gallery editing page and submits a crafted POST request where the keys of the |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 16, 2026
SQL injection in the Gallery by BestWebSoft WordPress plugin (all versions through 4.7.9) allows Editor-level or higher authenticated attackers to exfiltrate or manipulate the entire WordPress database by injecting arbitrary SQL via crafted array key names in the _gallery_order_{post_id} POST parameter. The gllr_save_postdata() function writes these unsanitized array keys directly into post meta without escaping or prepared statements, and downstream SQL queries consume them verbatim. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.
RemediationAI
Update the Gallery by BestWebSoft plugin to the version following 4.7.9; a fix commit is documented in the WordPress plugin Trac changeset at https://plugins.trac.wordpress.org/changeset?reponame=&old=3609291%40gallery-plugin&new=3609291%40gallery-plugin, indicating the issue has been addressed upstream. However, an exact patched release version number is not confirmed from available data - administrators should verify the current version in the WordPress plugin repository and update to the latest available release. As an interim compensating control, restricting the Editor role to fully trusted users reduces the exploitable attack surface, since this flaw requires at minimum Editor-level access to trigger. Disabling the plugin entirely until the patch is applied is the most conservative mitigation, with the trade-off of losing gallery functionality. Network-level WAF rules filtering SQL metacharacters in POST body array keys may provide partial mitigation but are unreliable against all injection variants and should not substitute for patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This is a CWE-89 (SQL Injection) vulnerability rooted in PHP array key handling within a WordPress plugin context. The affected code in gallery-plugin.php (line 1052) and class-gllr-media-table.php (line 58) processes $_POST input by iterating over array keys of _gallery_order_{post_id} - a pattern where user-controlled data is used as array keys rather than values, bypassing typical input sanitization that focuses on values. These keys are stored unsanitized into WordPress post meta via update_post_meta(), and when later retrieved and incorporated into SQL queries, they are not wrapped in $wpdb->prepare() or otherwise escaped. WordPress's $wpdb API provides prepared statement support, but this code path opts out of it. The CPE string cpe:2.3:a:bestwebsoft:gallery_by_bestwebsoft_-_customizable_image_and_photo_galleries_for_wordpress:*:*:*:*:*:*:*:* confirms the vulnerable component is the BestWebSoft gallery plugin for WordPress, all versions.
Know when Wordpress Plugin gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
PR:H reflects mandatory Editor-level WordPress authentication; AV:N and AC:L because exploitation is straightforward once that access exists; full C/I/A:H due to unrestricted database read/write via SQL injection.
Primary rating from Vendor (Wordfence).
CVSS VectorVendor: Wordfence
DescriptionCVE.org
The Gallery by BestWebSoft plugin for WordPress is vulnerable to SQL Injection via the '_gallery_order_{post_id}' parameter array keys in all versions up to, and including, 4.7.9. This is due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. The gllr_save_postdata() function stores unsanitized array keys from $_POST directly into post meta, which are later used in SQL queries without prepared statements. This makes it possible for authenticated attackers, with Editor-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Executive ViewAI
The Gallery by BestWebSoft WordPress plugin (versions through 4.7.9) contains an authenticated SQL injection vulnerability (CVE-2026-2497, CVSS 7.2) that allows Editor-level or higher users to directly manipulate or exfiltrate the entire WordPress database. Organizations using this plugin face data breach and data integrity risks from privileged insiders or accounts with editor access that become compromised. Immediate action is required to restrict access and isolate the exposure vector.
Restrict Editor and Administrator role assignments to essential personnel only; implement WAF rules targeting POST parameters containing SQL syntax; disable the plugin if operational requirements allow; enable and monitor database query logs for anomalous activity; conduct quarterly user access audits.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
Remote code execution in the WP Query Console WordPress plugin (versions up to and including 1.0) by Ajit Bohra allows u
EUVD-2026-59925
GHSA-p9qr-8pg6-7hvc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB