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

- **ID:** WPSEC-2026-3907
- **Plugin:** Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery (`nextgen-gallery`), https://wordpress.org/plugins/nextgen-gallery/
- **Affected versions:** from 4.2.1 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-3907/

## Description

The NextGEN Gallery plugin for WordPress is vulnerable to Insecure Direct Object Reference via the imagely/v1 REST API album update and delete routes in all versions from 4.2.1 up to, and including, 4.6.0. This is due to the permission callback authorizing only the album ID from the URL path, and treating an ID of 0 as the create route, while the update and delete handlers act on the 'id' request parameter, which a query-string or body value overrides. This makes it possible for authenticated attackers who have been granted the plugin's 'NextGEN Edit album' capability (for example Authors, when an administrator delegates it through the Roles screen) to edit or delete albums that belong to other users. They do not need to own an album themselves.

## References

- https://wpsec.com/vuln/WPSEC-2026-3907/
- 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-3907/

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.
