Some Drupal status messages could carry script that runs in another user's browser. This is cross-site scripting (XSS): an attacker gets their own JavaScript to run on your site, inside someone else's session. Drupal renders some status messages with JavaScript, and in certain situations it didn't clean them first.

Who is affected

Sites on drupal/core 8.8.0 and later below 10.2.11, 10.3.0 below 10.3.9, and 11.0.0 below 11.0.8. Drupal rates the attack as needing an ordinary user account, and says it applies only in some cases and configurations.

The fix is in Drupal\Core\Ajax\MessageCommand, which now filters plain-string messages before sending them to the browser. Ajax callbacks in custom or contributed modules that build a MessageCommand from text a user can influence are the place to check. Drupal 7 is not affected.

What to do

Update to the fixed release for your branch: 10.2.11, 10.3.9 or 11.0.8. Drupal 8, Drupal 9 and Drupal 10 before 10.2 no longer get security fixes. See SA-CORE-2024-003.

Reported by Jay Beaton.