Drupal Security Advisory
DRUPAL-CONTRIB-2026-131
Details
This module enables you to add dynamic caption support to PhotoSwipe image galleries.
The module doesn't sufficiently sanitize user-supplied input (such as image alt tags) in its dynamic caption script, leading to a Cross-Site Scripting (XSS) vulnerability.
This vulnerability is mitigated by the fact that an attacker must have a role that permits them to enter HTML content.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Packagist:https://packages.drupal.org/8 | drupal/photoswipe | All versions before 5.0.9 (fixed in 5.0.9) |