{"id":"CVE-2026-145562","summary":"Bagisto through 2.5.2 Predictable Coupon Codes via CartRuleCouponRepository","details":"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.","modified":"2026-12-05T16:00:16.058900056Z","published":"2026-12-05T14:04:53.898Z","database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-338"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145562.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/145xxx/CVE-2026-145562.json"},{"type":"PACKAGE","url":"https://github.com/bagisto/bagisto"},{"type":"ARTICLE","url":"https://github.com/bagisto/bagisto/blob/v2.5.2/packages/Webkul/CartRule/src/Repositories/CartRuleCouponRepository.php#L33-L60"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-145562"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/bagisto-through-2.5.2-predictable-coupon-codes-via-cartrulecouponrepository"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/bagisto/bagisto","events":[{"introduced":"0"},{"last_affected":"03114b667914054d48f0dd27698db04da5e07a13"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandardRange","range":[{"introduced":"0"},{"last_affected":"2.5.2"}]}]}}],"versions":["v2.5.2","v2.5.1","v2.5.0","v2.5.0-beta6","v2.5.0-beta5","v2.5.0-beta4","v2.5.0-beta2","v2.5.0-beta1","v2.4.1","v2.4.0","v2.4.0-beta6","v2.4.0-beta5","v2.4.0-beta4","v2.4.0-beta3","v2.4.0-beta2","v2.4.0-beta1","v2.3.4","v2.3.3","v2.3.2","v2.3.1","v2.3.0","v2.2.1","v2.2.0","v2.1.2","v2.1.1","v2.1.0","v2.0.0","v2.0.0-BETA-1","v1.4.5","v1.5.0","v1.4.4","v1.4.3","v1.4.2","v1.4.1","v1.4.0","1.4.0","v1.3.3","v1.3.2","v1.3.1","v1.3.0","v1.2.0","v1.2.0-BETA1","v1.1.2","v1.1.1","v1.1.0","v1.0.0","v1.0.0-BETA1","v0.1.8","v0.1.7","v0.1.6-ALPHA1","v0.1.5","v0.1.4","v0.1.4-BETA4","v0.1.4-BETA3","v0.1.4-BETA2","v0.1.4-BETA1","v0.1.3","v0.1.2","v0.1.1","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-145562.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"}]}