# WP ImageViewer <= 3.0.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via Image Alt Text

- **ID:** WPSEC-2026-2728
- **Plugin:** WP ImageViewer (`wp-imageviewer`), https://wordpress.org/plugins/wp-imageviewer/
- **Affected versions:** all versions before 3.0.3
- **Fixed in:** 3.0.3 (Update to 3.0.3 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-07)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wp-imageviewer
- **Fix released:** 2026-11-06
- **Published:** 2026-11-07
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2728/

## Description

The WP ImageViewer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via image alt text in all versions up to, and including, 3.0.2. This is due to the viewer's front-end JavaScript reading an image's alt attribute, which the browser has already entity-decoded, and writing it into the viewer's description with innerHTML instead of inserting it as text. This makes it possible for authenticated attackers, with contributor-level access and above, to put an image linked to an image file in a post with an alt attribute holding entity-encoded HTML. That markup survives content filtering and injects arbitrary web scripts that execute in a user's browser when the image is opened in the viewer.

## References

- https://wpsec.com/vuln/WPSEC-2026-2728/
- https://plugins.svn.wordpress.org/wp-imageviewer/tags/3.0.3/
- https://wordpress.org/plugins/wp-imageviewer/

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

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.
