Medium

Craft Commerce: Coupon Code Brute-Force via Rate Limit Bypass

  • Disclosed: 19.06.2026
  • Updated: 11.10.2026 10:22

Summary

The CartController defines a RateLimiter behavior that is only activated when the 'number' POST/GET parameter is explicitly provided.

Details

When an attacker submits coupon codes against the session-based cart (without passing a 'number' parameter), no rate limiting is applied. This allows unlimited attempts to guess coupon codes.

Vulnerable Code <img width="864" height="90" alt="resim" src="https://github.com/user-attachments/assets/a5197f10-f1fd-4331-93f9-9479d0ceebba" />

<img width="881" height="272" alt="resim" src="https://github.com/user-attachments/assets/d9db963f-5d1f-4b00-a4b4-5f2dfe2b71dd" /> <img width="861" height="271" alt="resim" src="https://github.com/user-attachments/assets/f7842493-3bc0-4e99-956c-7266bab15703" />

PoC

Complete instructions, including specific configuration details, to reproduce the vulnerability.

<img width="909" height="171" alt="resim" src="https://github.com/user-attachments/assets/cfc8c994-5e0c-48de-b728-464029beba0e" />

Impact

An attacker can enumerate all coupon codes through automated requests.

Remediation Apply rate limiting unconditionally on actionUpdateCart regardless of whether 'number' is present.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package craftcms/commerce >= 5.0.0, < 5.6.5, >= 4.0.0, < 4.11.2 5.6.5, 4.11.2

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-307
Platform
Composer
Package
craftcms/commerce
Disclosed
19.06.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-h5gm-x9wr-vhcm - CC BY 4.0

Vulnerability history: craftcms/commerce

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (21) in the archive
Total entries
21
First → latest
02.2026 06.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 5
  • Medium 13
  • Low 3

Disclosures per year

  1. 2026: 21
Severity:
  1. Craft Commerce: Coupon Code Brute-Force via Rate Limit Bypass this entry
    Medium CVE-2026-55795 >= 5.0.0, < 5.6.5, >= 4.0.0, < 4.11.2 5.6.5, 4.11.2
  2. High CVE-2026-32271 >= 4.0.0, < 4.10.3, >= 5.0.0, < 5.5.5 4.10.3, 5.5.5
  3. High CVE-2026-32272 >= 5.0.0, < 5.6.0 5.6.0
  4. High CVE-2026-29172 >= 4.0.0, < 4.10.2, >= 5.0.0, < 5.5.3 4.10.2, 5.5.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.