- Package
- drupal/imageapi_optimize_webp
- Fixed in
- 2.1.2
- Published
- Wed 21 Oct 2026, 19:06 Lisbon
In plain words
The module marks WebP image responses as publicly cacheable for file schemes other than Drupal's private file system. On sites serving access-controlled images from custom or temporary file schemes behind a shared cache that honours Cache-Control, this can expose cached images to users who should not have access. An attacker must know the path of a previously requested file still in the cache; access checks remain enforced for requests that reach the site itself.
Am I affected?
Look for drupal/imageapi_optimize_webp and its version in composer.lock. The advisory lists 2.1.2 as fixed but gives no affected version range. Check whether your site serves WebP image derivatives from access-controlled custom or temporary file schemes, and whether a shared cache such as Varnish or a CDN honours Cache-Control. Those conditions must apply for this exposure.
What to do
Check which version you have, then update to a fixed release for your branch (2.1.2):
composer show drupal/imageapi_optimize_webp | grep versions
composer update drupal/imageapi_optimize_webp
If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.
The advisory's description
This module enables you to generate and serve WebP derivatives of image style images, overriding Drupal core's image style download controller to serve them.
The module serves WebP image derivative responses with the HTTP header Cache-Control: public for all file schemes other than the private file system, including the temporary file system and access-controlled custom schemes. This can lead to some users getting cached versions of files with information they should not be able to access. For example, files may be cached by Varnish or a CDN.
This vulnerability is mitigated by the fact that it only affects sites that serve image derivatives from a custom or temporary file scheme with access control, behind a shared cache that honors the Cache-Control header. Access checks are still enforced on requests that reach the site itself. An attacker would also need to know the path of a previously requested file still in cache.
This is the same vulnerability class fixed in Drupal core by SA-CORE-2025-008 and SA-CORE-2026-010; the module's controller override reintroduced the behavior.
The advisory
- OSV.dev: DRUPAL-CONTRIB-2026-247
- The week's digest, with the other advisories from 19 Oct 2026
- All advisories for drupal/imageapi_optimize_webp