Gallery by BestWebSoft <= 4.7.9 - Authenticated (Editor+) SQL Injection via Gallery Image Order Array Keys

7.2
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
CVE CVE-2026-2497
CVSS 7.2 (High)
Publicly Published August 15, 2026
Last Updated August 16, 2026
Researcher Farrukh Ziyaev

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.

Learn more about SQL Injection vulnerabilities and how to prevent them.

References

Share

Vulnerability Details for Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress

Software Type Plugin
Software Slug gallery-plugin (view on wordpress.org)
Patched? Yes
Remediation Update to version 4.8.0, or a newer patched version
Affected Version
  • <= 4.7.9
Patched Version
  • 4.8.0

Recent vulnerabilities in Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress

# Title CVE ID CVSS Researchers Date
1 Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress <= 4.7.8 - Authenticated (Contributor+) SQL Injection CVE-2026-57642 6.5 dodoh4t June 26, 2026
2 Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress <= 4.7.3 - Authenticated (Administrator+) PHP Object Injection CVE-2024-13906 7.2 Hoang Phuc Vo (HrxKnight) March 6, 2025
3 Gallery by BestWebSoft <= 4.6.9 - Authenticated (Author+) Stored Cross-Site Scripting CVE-2023-0764 6.4 dc11 March 27, 2023
4 Gallery by BestWebSoft <= 4.6.9 - Authenticated (Author+) SQL Injection CVE-2023-0765 8.8 dc11 March 27, 2023
5 Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress <= 4.6.9 - Authenticated (Administrator+) Stored Cross-Site Scripting 4.4 March 23, 2023
6 Gallery by BestWebSoft – Customizable Image and Photo Galleries for WordPress < 4.5.0 - Reflected Cross-Site Scripting 6.1 Neven Birusk April 12, 2017

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation