# Photo Gallery, Sliders, Proofing and Themes <= 4.6.0 - Authenticated (Author+) Insecure Direct Object Reference to Image Modification and Deletion via REST API 'id' Parameter

- **ID:** WPSEC-2026-3908
- **Plugin:** Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery (`nextgen-gallery`), https://wordpress.org/plugins/nextgen-gallery/
- **Affected versions:** from 4.0.0 before 4.6.1
- **Fixed in:** 4.6.1 (Update to 4.6.1 or later.)
- **Severity:** Medium 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L)
- **Weakness:** CWE-639
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-11-25)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/nextgen-gallery
- **Fix released:** 2026-11-24
- **Published:** 2026-11-25
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3908/

## Description

The NextGEN Gallery plugin for WordPress is vulnerable to Insecure Direct Object Reference via the imagely/v1 REST API single-image update, delete and image operation routes in all versions from 4.0.0 up to, and including, 4.6.0. This is due to insufficient object-level authorization. Up to version 4.2.0 these routes did not check image ownership at all. From 4.2.1 onward, the permission callbacks authorize the image ID from the URL path, but the handlers act on the 'id' request parameter, which a query-string or body 'id' value overrides. This makes it possible for authenticated attackers who have been granted the plugin's 'NextGEN Manage gallery' capability (for example Authors, when an administrator delegates it through the Roles screen) but not 'NextGEN Manage others gallery' to edit, delete, rotate, crop, resize, watermark, recover, re-import metadata for or regenerate thumbnails of images in galleries that belong to other users.

## References

- https://wpsec.com/vuln/WPSEC-2026-3908/
- https://plugins.svn.wordpress.org/nextgen-gallery/tags/4.6.1/
- https://wordpress.org/plugins/nextgen-gallery/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-3908/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
