Square Thumbnails <= 2.4.0 - Authenticated (Author+) Limited Arbitrary File Deletion via Square Thumbnail Cleanup

Medium 5.4 CWE-706Fixed in 2.5
ID
WPSEC-2026-3758
Plugin
Square Thumbnails – Square Product Images Without Cropping (square-thumbnails)
Affected
from 2.3.5 before 2.5
Remediation
Update to 2.5 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Weakness
CWE-706
Usage
Plugin Low · Affected versions None seen among sites WPSec scans, 2026-11-24
Attack surface
Square Thumbnails on WPSec AttackSurface
Fix released
Published

Description

The Square Thumbnails plugin for WordPress is vulnerable to limited arbitrary file deletion via the attachment deletion cleanup routine in all versions up to, and including, 2.4.0, due to the cleanup_on_attachment_delete() function deleting every file matched by broad glob patterns (such as '<name>*-sqt.*' and '<name>-[0-9]*x[0-9]*.*') built from the deleted attachment's file name, without checking whether the matched files belong to other attachments. This makes it possible for authenticated attackers, with Author-level access and above, to upload and then delete an image with a chosen file name, causing thumbnail and square image files of other users' attachments in the same uploads folder to be deleted.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON, OSV or Markdown · All advisories: JSON, OSV, RSS

License: CC BY 4.0