CVE-2026-2497
Received Received - Intake

SQL Injection in Gallery by BestWebSoft WordPress Plugin

Vulnerability report for CVE-2026-2497, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-16

Last updated on: 2026-08-16

Assigner: Wordfence

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-16
Last Modified
2026-08-16
Generated
2026-08-16
AI Q&A
2026-08-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
bestwebsoft gallery to 4.7.9 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a SQL Injection flaw in the Gallery by BestWebSoft WordPress plugin up to version 4.7.9. It occurs because user-supplied input in the '_gallery_order_{post_id}' parameter is not properly sanitized before being used in SQL queries. Attackers with Editor-level access or higher can exploit this to inject malicious SQL code, potentially accessing sensitive database information.

Detection Guidance

To detect this vulnerability, inspect WordPress sites using the Gallery by BestWebSoft plugin versions up to 4.7.9. Check for suspicious SQL queries in logs or monitor post meta data for unsanitized array keys like '_gallery_order_{post_id}'. Use Wordfence or similar security plugins to scan for SQL injection attempts.

Impact Analysis

If you use this plugin, an attacker with Editor-level access could exploit this flaw to extract sensitive data from your WordPress database, such as user credentials, personal information, or other confidential data. This could lead to data breaches, unauthorized access, or further compromise of your website.

Compliance Impact

This vulnerability could lead to unauthorized access to personal data, violating GDPR's data protection requirements. For HIPAA, it may expose protected health information, risking compliance with security and privacy rules. Organizations using this plugin must address it promptly to avoid legal and regulatory penalties.

Mitigation Strategies

Immediately update the Gallery by BestWebSoft plugin to the latest version. If an update is unavailable, disable the plugin temporarily. Restrict Editor-level and higher user roles to reduce attack surface. Review database queries and post meta for signs of exploitation.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-2497. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart