Drupal can send some non-public files with a Cache-Control: public header, so a shared cache in front of the site keeps a copy. Another visitor can then get that cached file even though they aren't allowed to see it. Drupal's advisory names Varnish and CDNs as examples of such caches.
Who is affected
Only sites that meet both of these conditions:
- Non-public files are served through a custom or contributed module that adds its own file scheme, handled by core's
systemmodule. Sites that use only core's own private and temporary file handling aren't affected. - A shared cache, such as Varnish or a CDN, sits in front of the site.
The attacker also has to request a file that a user with more access already requested, while it is still in the cache. Drupal rates this as complex and the configuration as uncommon.
What to do
Update to the fixed release for your branch:
- Drupal 10.4: update to 10.4.9
- Drupal 10.5: update to 10.5.6
- Drupal 11.1: update to 11.1.9
- Drupal 11.2: update to 11.2.8
Drupal 11.0.x, 10.3.x and older no longer get security fixes, so move to a supported branch.
Reported by Damien McKenna and tame4tex.