Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
2DescriptionCVE.org
NextGEN Gallery version prior to 4.2.1 are vulnerable to authenticated SQL injection via the 'orderby' parameter on the REST API endpoints '/imagely/v1/galleries' and '/imagely/v1/albums'.
The root cause is an insufficient sanitization function ('_clean_column()') in the data mapper layer that uses a character blacklist instead of a whitelist approach. This allows an authenticated attacker with the 'NextGEN Gallery overview' capability (assigned to the Administrator role by default) to inject arbitrary SQL into the 'ORDER BY' clause.
AnalysisAI
Authenticated SQL injection in NextGEN Gallery (WordPress plugin by Awesome Motive/Imagely) before version 4.2.1 allows attackers holding the 'NextGEN Gallery overview' capability - granted to Administrators by default - to inject arbitrary SQL via the 'orderby' parameter on the '/imagely/v1/galleries' and '/imagely/v1/albums' REST endpoints. CVSS 4.0 rates this 9.3 due to high confidentiality, integrity, and scope impact; no public exploit identified at time of analysis, but the issue was reported by Tenable Research (TRA-2026-42) and a vendor patch is available.
Technical ContextAI
NextGEN Gallery is one of the most widely deployed WordPress photo gallery plugins, distributed by Awesome Motive/Imagely (CPE cpe:2.3:a:awesomemotive:nextgen_gallery). The vulnerability is a classic CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) rooted in the plugin's data mapper layer, specifically the '_clean_column()' sanitization routine. That function uses a character blacklist rather than a column-name whitelist, which is a known-bad pattern for ORDER BY clauses because ORDER BY values cannot be parameterized through prepared statements and therefore require strict allow-listing. The injection sink is reached through two authenticated REST API routes registered under the '/imagely/v1/' namespace that pass user-supplied 'orderby' values into the underlying SQL.
RemediationAI
Upgrade the NextGEN Gallery plugin to version 4.2.1 or later, which Tenable's advisory (https://www.tenable.com/security/research/tra-2026-42) confirms contains the vendor-released patch. Where immediate upgrade is not possible, reduce risk by auditing and minimizing the set of accounts holding the 'NextGEN Gallery overview' capability - revoke it from any non-essential Administrator-tier users and review for stale or shared admin accounts, since exploitation requires this capability. As a temporary compensating control, restrict access to the '/wp-json/imagely/v1/galleries' and '/wp-json/imagely/v1/albums' REST routes at the WAF or web-server layer (e.g., block or filter requests containing suspicious 'orderby' values such as parentheses, UNION, SLEEP, or comment sequences); note this will break legitimate admin gallery sorting and may be bypassable through encoding. Rotate WordPress secrets and review the database for signs of unauthorized queries if exposure to untrusted admin accounts is suspected.
More in Nextgen Gallery
View allThe WordPress Gallery Plugin - NextGEN Gallery plugin for WordPress is vulnerable to unauthorized access of data due to
The WordPress Gallery Plugin WordPress plugin before 3.39 is vulnerable to PHAR Deserialization due to a lack of input p
The WordPress Gallery Plugin WordPress plugin before 3.39 is vulnerable to Arbitrary File Read and Delete due to a lack
In the eCommerce module of the NextGEN Gallery Pro WordPress plugin before 3.1.11, there is an action to call get_cart_i
The Photo Gallery, Sliders, Proofing and WordPress plugin before 3.59.3 does not sanitise and escape some of its setting
In post-new.php in the Photocrati NextGEN Gallery plugin 2.1.10 for WordPress, unrestricted file upload is available via
A SQL injection vulnerability exists in the Imagely NextGEN Gallery plugin before 3.2.11 for WordPress. Rated critical s
The WordPress Gallery Plugin WordPress plugin before 3.39 does not validate some block attributes before using them to g
In the nggallery-manage-gallery page in the Photocrati NextGEN Gallery plugin 2.1.15 for WordPress, XSS is possible for
The Photo Gallery, Sliders, Proofing and WordPress plugin before 3.59.5 does not sanitise and escape some of its Images
The NextGEN Gallery WordPress plugin before 3.59.1 does not sanitise and escape some of its settings, which could allow
The Photo Gallery, Sliders, Proofing and WordPress plugin before 3.59.9 does not sanitise and escape some of its Image s
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-31073
GHSA-q977-85xc-w698