# WP Directory Kit <= 1.5.9 - Authenticated (Listing Admin+) Insecure Direct Object Reference to Arbitrary Attachment Deletion

- **ID:** WPSEC-2026-2731
- **Plugin:** WP Directory Kit (`wpdirectorykit`), https://wordpress.org/plugins/wpdirectorykit/
- **Affected versions:** from 1.5.1 before 1.6.1
- **Fixed in:** 1.6.1 (Update to 1.6.1 or later.)
- **Severity:** Low 3.3 (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L)
- **Weakness:** CWE-639
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-08)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wpdirectorykit
- **Fix released:** 2026-11-06
- **Published:** 2026-11-07
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2731/

## Description

The WP Directory Kit plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 1.5.9. When a listing is deleted, the deletion routine (Listing_m::delete) passes every ID stored in the listing's 'listing_images' field to wp_delete_attachment() without checking that the ID is an attachment or that the user may delete it. This makes it possible for authenticated attackers, with Listing Admin-level access and above, to delete arbitrary media attachments from the site. Exploitation requires the option that removes listing images on listing deletion to be enabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-2731/
- https://plugins.svn.wordpress.org/wpdirectorykit/tags/1.6.1/
- https://wordpress.org/plugins/wpdirectorykit/

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

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.
