Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain administrator-tier WordPress credentials
-
DeliveryAuthenticate to target WordPress REST API
-
ExploitSend crafted orderby payload to /imagely/v1/galleries
-
ExecutionInject SQL into ORDER BY clause
-
PersistExfiltrate user hashes and secrets from database
-
ImpactEscalate to persistent site-wide compromise
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 | Requires an authenticated WordPress session belonging to a user with the 'NextGEN Gallery overview' capability (granted to the Administrator role by default, so in practice any account with the Administrator role or any custom role explicitly granted that capability). The target site must run NextGEN Gallery prior to 4.2.1 with its REST API reachable by the attacker (default WordPress configuration exposes '/wp-json/imagely/v1/galleries' and '/imagely/v1/albums' over the network). No user interaction by another party is required (UI:N), and no non-default plugin configuration is needed. The principal limiting factor is the PR:H authentication bar - this is not exploitable by anonymous visitors, subscribers, contributors, authors, or editors, only by accounts holding the privileged capability. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:H/UI:N) describes a network-reachable, low-complexity attack that nonetheless requires high privileges, which materially narrows the realistic threat - an attacker must already hold the 'NextGEN Gallery overview' capability (Administrator by default). Impact metrics are severe (VC:H/VI:H, plus subsequent-system SC:H/SI:H/SA:H), reflecting that database read/write via SQLi on a WordPress install typically yields user hashes, secrets, and pivot opportunities into the broader site. Exploitation status: no public exploit identified at time of analysis, and the CVE is not on CISA KEV; EPSS data was not provided. The PR:H requirement means this is primarily a post-compromise privilege-amplification and persistence vector (e.g., a lower-trust admin, a compromised admin account, or a multi-tenant WordPress environment where 'admin' is not fully trusted) rather than an unauthenticated mass-exploitation risk. Treat as high priority where untrusted users hold admin-tier roles, otherwise standard patch-cycle priority. |
| Exploit ScenarioDerived | An attacker who has compromised or otherwise obtained an Administrator-level WordPress account on a site running NextGEN Gallery <4.2.1 sends an authenticated GET to '/wp-json/imagely/v1/galleries' with a crafted 'orderby' parameter that escapes the ORDER BY clause and appends a UNION-based or time-based SQL payload. The injected query exfiltrates WordPress 'wp_users' password hashes, secret keys, and session tokens, which the attacker uses to escalate to persistent control across other admins or pivot to other sites sharing the database. No public PoC is identified at time of analysis, but the technical detail in Tenable TRA-2026-42 is sufficient to reproduce the issue. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 20, 2026
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.
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.
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
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.
Know when Nextgen Gallery 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
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
Primary rating from Vendor (tenable) · only source for this CVE.
CVSS VectorVendor: tenable
Lifecycle Timeline
1DescriptionCVE.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.
Executive ViewAI
The NextGEN Gallery WordPress plugin (Awesome Motive) versions before 4.2.1 contain a critical vulnerability allowing unauthorized database access and data theft. This affects any organization using NextGEN Gallery to manage media on WordPress, risking exposure of sensitive business data and customer information. Immediate patching to version 4.2.1+ is required to prevent exploitation.
Apply vendor patch.
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 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
Unauthenticated cross-site scripting in the NextGEN Gallery WordPress plugin (versions <= 4.2.3) allows a remote, unauth
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
EUVD-2026-31073
GHSA-q977-85xc-w698
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB