Gallery : FooGallery <= 3.3.37 - Authenticated (Contributor+) Stored Cross-Site Scripting via Block 'thumbnail_size' and 'thumbnail_dimensions' Attributes

Medium 6.4 CWE-79Fixed in 3.3.48
ID
WPSEC-2026-4634
Plugin
FooGallery Photo Gallery : Image, Video & Masonry Galleries (foogallery)
Affected
all versions before 3.3.48
Remediation
Update to 3.3.48 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Weakness
CWE-79
Usage
Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-12-04
Attack surface
Gallery : FooGallery on WPSec AttackSurface
Fix released
Published

Description

The FooGallery Photo Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'thumbnail_size' and 'thumbnail_dimensions' attributes of the FooGallery block in all versions up to, and including, 3.3.37, due to insufficient input validation. The plugin accepts these attributes as arrays with any keys, and the gallery templates use the whole array as their rendering arguments. Extra keys such as 'link_attributes' and 'image_attributes' are then merged into the thumbnail link and image tags, so the link's href can be replaced with a javascript: URL. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

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