Drupal security updates, in plain English · Module

PhotoSwipe - Responsive JavaScript Modal Image Gallery

18,493 sites report using it · on drupal.org · 2 security updates explained here

This module allows a website to add dynamic captions to image galleries.

Below is every security update for PhotoSwipe - Responsive JavaScript Modal Image Gallery that this site has covered, newest first. Each one says who could exploit it, whether it applies to your site, how urgent it is, and what to tell your developer. If your site uses this module and you are not sure which version, that is the first question to ask whoever looks after it.

PhotoSwipe - Responsive JavaScript Modal Image Gallery

Moderately critical · 18,493 sites report using it · SA-CONTRIB-2026-131 · on drupal.org · Week of 2 September 2026

The module does not properly clean user supplied text like image descriptions. A user with an ordinary account could read hidden data or change data on the website.

  • Who could do thisOnly someone with a login on your site.
  • Does it apply to youAny site using this module where an attacker has an access right that permits them to enter HTML content.
  • Has it been used in attacksNo sign of it.
  • How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.

Tell your developerUpdate PhotoSwipe - Responsive JavaScript Modal Image Gallery to 5.0.9.

For developers: what the fix changed

The fix escapes the caption title using Drupal.checkPlain in modules/photoswipe_dynamic_caption/js/photoswipe_dynamic_caption.init.js and removes the previous escaping in modules/photoswipe_dynamic_caption/photoswipe_dynamic_caption.module.

Also in this release The release also improves media translation context handling in src/ImageDTO.php.

5.0.8 to 5.0.9 2 commits, 3 files.

  • modules/photoswipe_dynamic_caption/js/photoswipe_dynamic_caption.init.js +3 −1 fix
  • modules/photoswipe_dynamic_caption/photoswipe_dynamic_caption.module +4 −2 fix
  • src/ImageDTO.php +6 −2

Full diff, 5.0.8 to 5.0.9

The comparison is against the release immediately before the fix. If your site is on an older release, more will have changed.

PhotoSwipe - Responsive JavaScript Modal Image Gallery

Moderately critical · 18,493 sites report using it · SA-CONTRIB-2026-088 · on drupal.org · Week of 22 July 2026

Anyone without logging in could see images in a gallery that should be restricted. They could not change or delete any information on the site.

  • Who could do thisAnyone visiting the site. No login needed.
  • Does it apply to youThis applies if the site limits access rights to the images shown in the gallery.
  • Has it been used in attacksNo sign of it.
  • How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.

Tell your developerUpdate PhotoSwipe - Responsive JavaScript Modal Image Gallery to 3.2.0.

For developers: what the fix changed

The fix adds an access check (`$item->entity->access('view')`) before rendering the image in the `viewElements` method of `PhotoswipeFieldFormatter.php`.

Also in this release The release also replaces deprecated `jQuery.once()` with `core/once`, adds tests, fixes formatter settings for hidden images, updates documentation, and resolves coding standard issues.

3.1.4 to 3.2.0 10 commits, 17 files including 6 tests.

  • README.md +53 −0
  • README.txt +0 −50
  • js/photoswipe.jquery.js +2 −2
  • photoswipe.libraries.yml +10 −9
  • photoswipe.module +72 −1
  • src/ImageDTO.php +0 −1
  • src/PhotoswipeAssetsManager.php +3 −5
  • src/PhotoswipePreprocessProcessor.php +1 −0
  • src/PhotoswipeResponsivePreprocessProcessor.php +20 −3
  • src/Plugin/Field/FieldFormatter/PhotoswipeFieldFormatter.php +35 −33 fix
  • src/Plugin/Field/FieldFormatter/PhotoswipeResponsiveFieldFormatter.php +0 −2

Full diff, 3.1.4 to 3.2.0

The comparison is against the release immediately before the fix. If your site is on an older release, more will have changed.

Not sure what your site is running?

Send me your Drupal site's address.

I'll tell you what I can see from outside, what the Drupal 10 end of life on 9 December means for it, and what it would cost to have me keep it patched. There's no charge for that and no obligation. peter@peterbrady.co.uk


Get in touch

Tell me who you are, what your organisation does, and what you need. That might be a Drupal site that needs looking after, an upgrade to get done before December, or an agency that needs Drupal cover.

If I can help, I'll say so and suggest a call. If I can't, I'll tell you straight away rather than waste your time.

peter@peterbrady.co.uk

For context: I work mainly with UK charities, membership bodies and research organisations, and with the agencies that look after their websites. Not recruiters.

Or start smaller and connect with me on LinkedIn. That's where I post what I find digging around in charity and grants data, and where the free tools turn up first.