CVE-2026-145562: Bagisto through 2.5.2 Predictable Coupon Codes via CartRuleCouponRepository

Published Dec 5, 2026
·
Updated

Bagisto through 2.5.2 contains an insecure randomness vulnerability that allows customers to predict bulk coupon codes generated by CartRuleCouponRepository::getRandomString() using PHP rand(). Attackers holding two or more codes from one batch can recover the 32-bit Mersenne Twister seed and compute unissued codes to redeem discounts meant for others.

Affected Software

1 affected component
Webkul Bagisto<=2.5.2

Event History

Dec 5, 2026
CVE Published
via MITRE·02:04 PM
Data Sourced
via MITRE·02:04 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Bagisto deployments through 2.5.2 that generate bulk coupon codes are exposed. A customer or other low-privileged user who can obtain codes from the same generated batch may be able to predict additional codes.

2

What does an attacker need to exploit it?

The attacker needs two or more coupon codes from a single batch. They can use those codes to recover the 32-bit Mersenne Twister seed used by PHP rand() and calculate unissued codes from that batch.

3

What is the impact of successfully predicting coupon codes?

An attacker can redeem discounts associated with unissued coupon codes that were intended for other recipients. The stated impact is limited to integrity; no confidentiality or availability impact is identified.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203