Skip to content

Coupon Code Brute-Force via Rate Limit Bypass

Moderate
angrybrad published GHSA-h5gm-x9wr-vhcm Jun 16, 2026

Package

composer craftcms/commerce (Composer)

Affected versions

>= 5.0.0, <= 5.6.4
>= 4.0.0, <= 4.11.1

Patched versions

5.6.5
4.11.2

Description

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
resim

resim resim

PoC

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

resim

Impact

An attacker can enumerate all coupon codes through automated requests.

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

References

df22c4f

Severity

Moderate

CVE ID

CVE-2026-55795

Weaknesses

Improper Restriction of Excessive Authentication Attempts

The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame. Learn more on MITRE.

Credits