Drupal security updates, in plain English · Module

Commerce Product Alternative

7 sites report using it · on drupal.org · 1 security update explained here

This module lets shoppers swap an item in their basket for a similar alternative without having to remove and add it again.

Below is every security update for Commerce Product Alternative 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.

Commerce Product Alternative

Critical · 7 sites report using it · SA-CONTRIB-2026-301 · on drupal.org · Week of 4 November 2026

The module fails to check who owns a shopping basket when the visitor is not logged in. Anyone could view the names and prices of items in other visitor baskets and swap them for alternatives. They could uncover hidden details and alter basket contents.

  • Who could do thisAnyone visiting the site. No login needed.
  • Does it apply to youSites are affected only for the shopping baskets of visitors who are not logged in.
  • Has it been used in attacksNo sign of it.
  • How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.

Tell your developerUpdate Commerce Product Alternative to 1.0.1.

For developers: what the fix changed

Updates `SwitchAccessChecker::access` to verify cart ownership using `CartProviderInterface::getCartIds` instead of comparing customer IDs, ensuring anonymous users can only access carts tied to their own session. It also disables caching for the switch route in `commerce_product_alternative.routing.yml`.

Also in this release Added a kernel test to verify access control for anonymous and authenticated carts.

1.0.0 to 1.0.1 1 commit, 3 files including 1 test.

  • commerce_product_alternative.routing.yml +2 −0 fix
  • src/Access/SwitchAccessChecker.php +8 −4 fix

Full diff, 1.0.0 to 1.0.1

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 membership bodies, charities 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.