Skip to main content

NextGEN Gallery CVE-2026-9059

| EUVDEUVD-2026-31073 CRITICAL
SQL Injection (CWE-89)
2026-05-20 tenable GHSA-q977-85xc-w698
9.3
CVSS 4.0 · Vendor: tenable
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain administrator-tier WordPress credentials
  2. Delivery
    Authenticate to target WordPress REST API
  3. Exploit
    Send crafted orderby payload to /imagely/v1/galleries
  4. Execution
    Inject SQL into ORDER BY clause
  5. Persist
    Exfiltrate user hashes and secrets from database
  6. Impact
    Escalate 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

NextGEN Gallery O <4.2.1

Affected Packages

euvd nextgen_gallery_o fix: 4.2.1

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

Vendor (tenable) PRIMARY 9.3 CRITICAL
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

1
Patch available
May 20, 2026 - 09:01 EUVD

DescriptionCVE.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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2024-3097 MEDIUM POC
5.3 Apr 09

The WordPress Gallery Plugin - NextGEN Gallery plugin for WordPress is vulnerable to unauthorized access of data due to

CVE-2023-3154 HIGH POC
7.5 Oct 16

The WordPress Gallery Plugin WordPress plugin before 3.39 is vulnerable to PHAR Deserialization due to a lack of input p

CVE-2023-3155 HIGH POC
7.2 Oct 16

The WordPress Gallery Plugin WordPress plugin before 3.39 is vulnerable to Arbitrary File Read and Delete due to a lack

CVE-2026-28141 HIGH POC
7.1 Aug 06

Unauthenticated cross-site scripting in the NextGEN Gallery WordPress plugin (versions <= 4.2.3) allows a remote, unauth

CVE-2021-24293 MEDIUM POC
6.1 May 05

In the eCommerce module of the NextGEN Gallery Pro WordPress plugin before 3.1.11, there is an action to call get_cart_i

CVE-2024-5442 MEDIUM POC
5.9 Jul 13

The Photo Gallery, Sliders, Proofing and WordPress plugin before 3.59.3 does not sanitise and escape some of its setting

CVE-2015-9228 HIGH
8.8 Sep 12

In post-new.php in the Photocrati NextGEN Gallery plugin 2.1.10 for WordPress, unrestricted file upload is available via

CVE-2019-14314 CRITICAL
9.8 Aug 27

A SQL injection vulnerability exists in the Imagely NextGEN Gallery plugin before 3.2.11 for WordPress. Rated critical s

CVE-2023-3279 MEDIUM POC
4.9 Oct 16

The WordPress Gallery Plugin WordPress plugin before 3.39 does not validate some block attributes before using them to g

CVE-2015-9229 MEDIUM POC
4.8 Sep 12

In the nggallery-manage-gallery page in the Photocrati NextGEN Gallery plugin 2.1.15 for WordPress, XSS is possible for

CVE-2024-6393 MEDIUM POC
4.8 Nov 25

The Photo Gallery, Sliders, Proofing and WordPress plugin before 3.59.5 does not sanitise and escape some of its Images

CVE-2024-2744 MEDIUM POC
4.3 May 17

The NextGEN Gallery WordPress plugin before 3.59.1 does not sanitise and escape some of its settings, which could allow

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy