Drupal Commerce Security Advisory: Update and Audit Your Store

By Bug Circuit Security Team
Drupal Commerce Security Advisory: Update and Audit Your Store

Is your own website affected? Check it free in 2 minutes.

Passive outside check only. Nothing is attacked, no signup.

If a Drupal security advisory covers your Commerce store, read it today, update Commerce Core to the fixed version it lists, then review your recent orders, user accounts and payment settings.

This post is for store owners and the people who look after their Drupal sites. You will get a plain-English explanation of what an access bypass is, a step-by-step update routine, and an audit checklist you can finish in an afternoon. We do not quote version numbers here. Those must come from Drupal's own advisory, and we point you to it below.

What is an access bypass in Drupal Commerce?

Drupal Commerce is the add-on (a "module") that turns a Drupal site into an online store. It handles products, carts, orders and payments. Its core code is called Commerce Core.

An access bypass is a bug that lets someone do or see something they should not be allowed to. Normally Drupal checks who you are and what you may do. With a bypass, one of those checks fails or gets skipped. In a store, that could touch things like order data, customer details or admin-only actions. The exact effect depends on the specific flaw.

Security people call this class of bug "broken access control." OWASP lists it as a top web application risk.

What matters for you: the Drupal Security Team publishes the real details, including which versions are affected and which are fixed. Use those details, not a blog summary or a forum post.

Step 1: Read the official advisory first

Drupal posts every security advisory at drupal.org/security. Open it and find the Commerce entry. Write down these items:

  • Advisory ID and date. This helps you note when you became aware of it.
  • Affected versions. Compare them with the version you run.
  • Fixed versions. This is the version you need to reach.
  • Risk level and any conditions. Some bugs only matter if a certain feature or setting is on.
  • Workarounds, if any. Updating is still the real fix.

If a news article gives a version number that does not match the advisory, trust the advisory. The advisory is the primary source. You can also check the Commerce project page for release notes.

Match the project name (Commerce) and the date on the advisory page itself.

Step 2: Find out which version you run

You can see this in two places.

  1. In the admin area, go to /admin/reports/status (Reports, then Status report) and /admin/reports/updates (Available updates). Drupal flags modules with security updates.
  2. If you have command-line access, run this from your project folder:
composer show drupal/commerce

The versions line shows what is installed. You can also run composer audit, which checks your installed packages against known security advisories.

Step 3: Back up, then update

Take a fresh backup of the database and files first. If your host offers snapshots, use one. Test the update on a staging copy if you have one. Then update through Composer, which is how Drupal 8 and later sites manage modules (see Drupal's updating guide).

composer update drupal/commerce --with-dependencies
drush updb -y
drush cr

If composer show drupal/commerce still shows a version below the fixed one, your composer.json constraint is holding it back. Run composer require "drupal/commerce:^2" --update-with-dependencies (use ^3 instead if you run the 3.x branch), then run the update steps again.

What these do:

  • composer update downloads the new code.
  • drush updb runs any database updates the new code needs.
  • drush cr clears caches so Drupal uses the new code.

If you do not use Drush or Composer, ask your developer or host to do it. Do not edit module files by hand. After the update, run composer show drupal/commerce again and confirm the version is at or above the fixed version for your Commerce release branch (for example 2.x or 3.x).

Place a test order after updating. Check that the cart, checkout and payment all work.

Step 4: Audit your recent orders

An update closes the hole going forward. It does not tell you whether someone used it before. So look back. Start with the period before you updated, and go back as far as your logs and records allow.

In the admin area, open /admin/commerce/orders and look for:

  • Orders you do not recognize, or orders with odd emails.
  • Orders that were edited or had their state changed without a clear reason.
  • Unexpected refunds, discounts, free orders or changed totals.
  • Orders belonging to customers who say they never placed them.

If you have database access, you can list the most recently changed orders directly. This is a read-only query:

drush sql:query "SELECT order_id, mail, state, total_price__number, FROM_UNIXTIME(changed) AS changed FROM commerce_order ORDER BY changed DESC LIMIT 50"

This works on MySQL or MariaDB. Skim the list for anything that stands out.

Step 5: Audit user accounts

A common next move after an access problem is to create or upgrade an account. So check who can log in.

  1. Open /admin/people and sort by newest. Look for accounts you did not expect.
  2. Filter by role. Look at who has Administrator or any store manager role.
  3. Remove or block accounts you cannot explain. Do not delete first if you want to keep evidence. Blocking is safer.
  4. Reset passwords for admin and staff accounts, and turn on two-factor authentication if your site supports it.

Optional command-line views:

drush sql:query "SELECT uid, name, mail, FROM_UNIXTIME(created) AS created, FROM_UNIXTIME(access) AS last_access FROM users_field_data ORDER BY created DESC LIMIT 25"
drush sql:query "SELECT entity_id AS uid, roles_target_id AS role FROM user__roles WHERE roles_target_id = 'administrator'"

The second query lists every user with the default administrator role. If you made custom roles, check those too.

Step 6: Check your payment settings

A store is a target because it touches money. After an access issue, confirm nobody changed how payments work.

Go to /admin/commerce/config/payment-gateways and check each gateway:

  • Mode. Is it in Live mode, as you expect? A gateway left in Test mode can quietly record orders without taking money.
  • Credentials. Do the API keys and account IDs match your payment provider's dashboard?
  • Return and notification URLs. These should point to your own site only.
  • Other settings. Look at anything that changed recently.

Then log in to your payment provider's dashboard (not through a link in an email). Review recent payouts, refunds and any changes to your bank details. If anything looks off, contact the provider and rotate your API keys.

Step 7: Look at logs and watch for changes

Open /admin/reports/dblog (Recent log messages) and look for access denied errors, repeated failed logins or admin actions at strange hours. Also ask your host for web server access logs if they keep them. Many hosts only keep a short window, so ask early.

If you find signs of a break-in, switch to our website hacked guide for containment steps.

Quick audit checklist

What to checkWhereWhat looks wrong
Commerce versioncomposer show drupal/commerceOlder than the fixed version in the advisory
Recent orders/admin/commerce/ordersUnknown orders, odd totals, unexplained edits
New or changed users/admin/peopleUnfamiliar admins, new accounts with elevated roles
Payment gateways/admin/commerce/config/payment-gatewaysTest mode on a live store, changed keys or URLs
Provider dashboardYour payment provider's siteSurprise refunds, payouts or bank changes
Site logs/admin/reports/dblogAccess denied bursts, odd admin activity

What this does not tell you

A clean audit is a good sign, not a guarantee. Old logs may be gone, and subtle changes are easy to miss. Be honest with yourself about how far back you could look.

If you handle customer data and cannot rule out misuse, check the privacy and breach-notice rules where you and your customers live. A lawyer or your payment provider can advise you on that.

How to catch the next one sooner

Unpatched software is a common way stores get into trouble. Build a small habit:

  • Subscribe to Drupal's security announcements and check them weekly.
  • Update modules soon after a security release.
  • Keep staff accounts to the minimum and remove old ones.
  • Run a quick outside check. Our free website security check looks at your site from the outside, with no login and no card. It will not detect this specific Commerce bug, but it is a fast way to spot easy gaps.

If you wonder how exposed a store really is, our guide is my website hackable explains what an outsider can and cannot see.

Key takeaways

  • Read the official advisory at drupal.org/security. Take the affected and fixed Commerce versions from there only.
  • Back up, update with Composer, run drush updb and drush cr, then confirm the version and test a checkout.
  • Audit recent orders and user accounts, because an update does not undo anything that already happened.
  • Check payment gateway mode, credentials and URLs, then review your payment provider's dashboard.
  • If something looks wrong, block suspicious accounts, rotate keys and follow our website hacked steps.

Want a human to check your store?

If you would like a person to look at your store, the Circuit audit is $49 one-time. A security engineer manually reviews your site and writes up every issue with evidence and exact fixes. It is a focused small-site audit, not a multi-week enterprise pentest or a compliance certificate. It will not replace updating Commerce today.

Want certainty, not guesswork?

A real human security engineer audits your whole site by hand and sends a full report: every issue, its severity, and the exact fix. From $49, with a 14-day money-back guarantee.

See pricing

Frequently asked questions

What is an access bypass in Drupal Commerce?
It is a flaw that lets someone get past a permission check in Commerce Core, the Drupal module that runs online stores. Any Drupal security advisory for Commerce lists the exact affected and fixed versions, so read it at drupal.org/security.
How do I know if my Drupal store was hacked?
Look for orders you do not recognize, new admin accounts, changed payment gateway settings and odd entries in your logs. Also check your payment provider's dashboard for surprise refunds or payouts. If you find any of these, block suspicious accounts, rotate your keys and follow a hacked-site checklist.
How do I update Drupal Commerce?
Back up first, then run composer update drupal/commerce --with-dependencies, followed by drush updb -y and drush cr. Confirm the version with composer show drupal/commerce, then place a test order. If it still shows a version below the fixed one, your composer.json constraint is holding it back. Run composer require "drupal/commerce:^2" --update-with-dependencies (use ^3 if you run the 3.x branch). If you do not use these tools, ask your developer or host.
Where do I find the official Drupal Commerce security advisory?
Drupal publishes all advisories at drupal.org/security, each with an ID, a date and a project name. Find the Commerce entry there, or check the Commerce project page at drupal.org/project/commerce. Use the advisory's affected and fixed versions rather than numbers from news posts.
Do I need to audit orders after updating Drupal Commerce?
Yes. Updating closes the gap going forward but does not show whether anyone used it earlier. Review recent orders, user accounts, payment settings and logs from before you updated.

Keep reading

See what attackers see, for free

Run the free passive check on your website. No login, no impact on your site, results in seconds.

Ready for the full manual audit? See pricing

Published by Bug Circuit. Written with AI assistance and reviewed for accuracy before publishing.