SA-CONTRIB-2026-131: XSS
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.
Credit
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
drupal/photoswipeto a version that resolves this vulnerability.Fixed in 5.0.9
Event History
Frequently Asked Questions
Who is realistically able to exploit this issue?
An attacker must have a role that permits them to enter HTML content. Users without permission to enter HTML content are not described as able to trigger the vulnerability.
What input is affected?
The dynamic caption script does not sufficiently sanitize user-supplied input, including image alt tags. Malicious HTML entered through such content can result in cross-site scripting.