Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. sylius/sylius
  4. ›
  5. CVE-2026-31824

CVE-2026-31824: Sylius has a Promotion Usage Limit Bypass via Race Condition

March 11, 2026

A Time-of-Check To Time-of-Use (TOCTOU) race condition was discovered in the promotion usage limit enforcement. The same class of vulnerability affects three independent limits:

  1. Promotion usage limit - the global used counter on Promotion entities
  2. Coupon usage limit - the global used counter on PromotionCoupon entities
  3. Coupon per-customer usage limit - the per-customer redemption count on PromotionCoupon entities

In all three cases, the eligibility check reads the used counter (or order count) from an in-memory Doctrine entity during validation, while the actual usage increment in OrderPromotionsUsageModifier happens later during order completion — with no database-level locking or atomic operations between the two phases.

Because Doctrine flushes an absolute value (SET used = 1) rather than an atomic increment (SET used = used + 1), and because the affected entities lack optimistic locking, concurrent requests all read the same stale usage counts and pass the eligibility checks simultaneously.

An attacker can exploit this by preparing multiple carts with the same limited-use promotion or coupon and firing simultaneous PATCH /api/v2/shop/orders/{token}/complete requests. All requests pass the usage limit checks and complete successfully, allowing a single-use promotion or coupon to be redeemed an arbitrary number of times. The per-customer limit can be bypassed in the same way by a single customer completing multiple orders concurrently. No authentication is required to exploit this vulnerability.

This may lead to direct financial loss through unlimited redemption of limited-use promotions and discount coupons.

References

  • github.com/Sylius/Sylius
  • github.com/Sylius/Sylius/security/advisories/GHSA-7mp4-25j8-hp5q
  • github.com/advisories/GHSA-7mp4-25j8-hp5q
  • nvd.nist.gov/vuln/detail/CVE-2026-31824

Code Behaviors & Features

Detect and mitigate CVE-2026-31824 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.9.12, all versions starting from 1.10.0 before 1.10.16, all versions starting from 1.11.0 before 1.11.17, all versions starting from 1.12.0 before 1.12.23, all versions starting from 1.13.0 before 1.13.15, all versions starting from 1.14.0 before 1.14.18, all versions starting from 2.0.0 before 2.0.16, all versions starting from 2.1.0 before 2.1.12, all versions starting from 2.2.0 before 2.2.3

Fixed versions

  • 1.9.12
  • 1.10.16
  • 1.11.17
  • 1.12.23
  • 1.13.15
  • 1.14.18
  • 2.0.16
  • 2.1.12
  • 2.2.3

Solution

Upgrade to versions 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 1.9.12, 2.0.16, 2.1.12, 2.2.3 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Source file

packagist/sylius/sylius/CVE-2026-31824.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 11 Mar 2026 12:20:24 +0000.