# CVE-2026-9059: Imagely NextGEN Gallery SQL injection in REST API

Source: https://junglewise.ai/threats/cve-2026-9059-imagely-nextgen-gallery-sql-injection-in-rest-api  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-20. Updated: 2026-05-20  
License: CC BY 4.0 with a link back

CVE-2026-9059 · Severity: info · CVSS 9.3 · Published 2026-05-20

NextGEN Gallery is a popular WordPress plugin used for managing and displaying image galleries. A security flaw in versions prior to 4.2.1 allows an authorized user with administrative-level permissions to execute unauthorized database commands. This could lead to the exposure of sensitive site data or full database compromise, though it requires the attacker to already have high-level access to the site's management interface.

Technologies: [Imagely NextGEN Gallery](https://junglewise.ai/threats/technologies/nextgen-gallery). Vendors: [Imagely](https://junglewise.ai/threats/vendors/imagely).

## Quick answers

**Is CVE-2026-9059 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-9059 being exploited in the wild.

**How severe is CVE-2026-9059?** Informational severity, with a CVSS score of 9.3, published 20 May 2026.

**Which products and versions are affected?** Imagely NextGEN Gallery < 4.2.1.

**Is there a fix for CVE-2026-9059?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-9059 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-9059?** Check whether you run Imagely NextGEN Gallery at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An authenticated SQL injection vulnerability exists in NextGEN Gallery's REST API endpoints '/imagely/v1/galleries' and '/imagely/v1/albums'. The root cause is insufficient sanitization in the '_clean_column()' function within the data mapper layer, which relies on a character blacklist rather than a whitelist. An attacker with 'NextGEN Gallery overview' capabilities (typically Administrators) can manipulate the 'orderby' parameter to inject arbitrary SQL into the 'ORDER BY' clause. This can be used to extract sensitive information from the WordPress database. The issue is resolved in version 4.2.1.

## Affected products

- Imagely NextGEN Gallery < 4.2.1

## Timeline

- 2026-04-07: other: Tenable sends request for contact
- 2026-04-14: other: Vendor acknowledgement
- 2026-04-15: other: Tenable sends details to vendor
- 2026-05-20: disclosed: Initial advisory release

## References

- [https://www.tenable.com/security/research/tra-2026-42](https://www.tenable.com/security/research/tra-2026-42)

## Related threats

- [NextGEN Gallery remote code execution in legacy_render](https://junglewise.ai/threats/cve-2026-76012-the-photo-gallery-sliders-proofing-and-themes-nextgen-gallery)
- [NextGEN Gallery arbitrary file upload via ZIP import](https://junglewise.ai/threats/cve-2026-81650-the-photo-gallery-sliders-proofing-and-wordpress-plugin-before-4)
- [Imagely NextGEN Gallery IDOR in image deletion REST flow](https://junglewise.ai/threats/cve-2026-6566-imagely-nextgen-gallery-idor-in-image-deletion-rest-flow)
