CVE-2026-47741: shopper/framework Race Condition On Discount.usage_limit Allows Vulnerability
MODERATECVE-2026-47741 is a MODERATE (CVSS 5.9) race condition on discount.usage_limit allows vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting shopper/framework libraries in the Packagist ecosystem. The issue involves race condition on discount.usage_limit allows silent over-redemption. Remediation is available by upgrading affected packages to version 2.8.0.
CVE-2026-47741 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-47741
To remediate this vulnerability, upgrade all affected shopper/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade shopper/cart to 2.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for shopper/cart
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-47741, inspect your project dependencies for shopper/framework:
inspect dependencies for shopper/cart
Analyze the terminal output to locate any version of shopper/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In shopper/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-47741 Affected shopper/framework Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
shopper/cart
|
Packagist |
< 2.8.0
|
2.8.0
|
References
Frequently Asked Questions
What is CVE-2026-47741?
Which shopper/framework versions are affected?
What version fixes CVE-2026-47741?
Is shopper/cart affected?
What is the CVSS score of CVE-2026-47741?
What CWE is associated with CVE-2026-47741?
How can I check Packagist dependencies for CVE-2026-47741?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9rh9-hf3w-9fgg",
"modified" : "2026-06-08T20:07:26Z",
"published" : "2026-05-18T16:37:20Z",
"aliases" : [ "CVE-2026-47741" ],
"summary" : "shopper/framework: Race condition on Discount.usage_limit allows silent over-redemption",
"details" : "## Impact\n\n`CreateOrderFromCartAction::execute` previously created the `Order` row before checking and incrementing the discount's `total_use` counter. Under concurrent checkout pressure (Black Friday, flash sale, viral coupon), the global `usage_limit` was silently exceeded: orders were committed with the discount fully applied to `price_amount` while the counter blocked at `usage_limit`. The merchant had no signal that an over-redemption had occurred.\n\nA second related bug: `usage_limit_per_user` was effectively a no-op because the counter it relied on (`DiscountDetail.total_use`) was never incremented anywhere in the codebase. The per-user check therefore always saw `0` uses and validation passed regardless of how many times the same customer had previously redeemed the coupon. For `eligibility = Everyone` the per-user limit could not fire at all because the underlying `DiscountDetail` row only exists for `eligibility = Customers`.\n\nDirect financial loss: each over-redemption is a discount the merchant did not intend to grant.\n\n## Patches\n\nFixed in `v2.8.0`. `CreateOrderFromCartAction` now:\n\n- Reserves the discount slot atomically before the order row is created, inside the same `DB::transaction` with `lockForUpdate` and a compare-and-swap on `total_use`.\n- Throws `DiscountLimitReachedException::global` and rolls back the transaction when the global limit was exhausted between cart validation and commit. No order is committed.\n- Throws `DiscountLimitReachedException::perUser` and rolls back when the discount is restricted to one use per customer and the customer has already redeemed it.\n- Snapshots `discount_id`, `discount_code`, `discount_type`, `discount_value_at_apply` and `discount_currency_code` onto the `orders` table for resilience against later discount edits or deletions.\n\n`DiscountValidator` was updated to perform the same Order-based per-user check at cart-apply time so the rejection is surfaced before checkout.\n\nUpgrade via:\n\n`composer require shopper/cart:^2.8 shopper/core:^2.8`\n`php artisan migrate`\n\n## Workarounds\n\nNone. Upgrade to `v2.8.0`.\n\n## Resources\n\n- Issue: https://github.com/shopperlabs/shopper/issues/510\n- Pull request: https://github.com/shopperlabs/shopper/pull/511\n- CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "shopper/cart"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/shopperlabs/shopper/security/advisories/GHSA-9rh9-hf3w-9fgg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47741"
}, {
"type" : "WEB",
"url" : "https://github.com/shopperlabs/shopper/issues/510"
}, {
"type" : "WEB",
"url" : "https://github.com/shopperlabs/shopper/pull/511"
}, {
"type" : "WEB",
"url" : "https://github.com/shopperlabs/shopper/commit/fcd0c5920588702df5b874f432b1042abd77a50b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/shopperlabs/shopper"
}, {
"type" : "WEB",
"url" : "https://github.com/shopperlabs/shopper/releases/tag/v2.8.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-362" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T16:37:20Z",
"nvd_published_at" : "2026-05-29T19:16:25Z"
}
}