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

CVE-2026-31821: Sylius is Missing Authorization in API v2 Add Item Endpoint

March 11, 2026

The POST /api/v2/shop/orders/{tokenValue}/items endpoint does not verify cart ownership. An unauthenticated attacker can add items to other registered customers’ carts by knowing the cart tokenValue.

POST /api/v2/shop/orders/{tokenValue}/items

Other mutation endpoints (PUT, PATCH, DELETE) are not affected. API Platform loads the Order entity through the state provider for these operations, which triggers VisitorBasedExtension and returns 404 for unauthorized users.

An attacker who obtains a cart tokenValue can add arbitrary items to another customer’s cart. The endpoint returns the full cart representation in the response (HTTP 201), potentially leaking:

  • Customer email address
  • Cart contents (products, quantities, prices)
  • Address data (billing and shipping if set)
  • Payment and shipment IDs
  • Order totals and tax breakdown
  • Checkout state

References

  • github.com/Sylius/Sylius
  • github.com/Sylius/Sylius/security/advisories/GHSA-wjmg-4cq5-m8hg
  • github.com/advisories/GHSA-wjmg-4cq5-m8hg
  • nvd.nist.gov/vuln/detail/CVE-2026-31821

Code Behaviors & Features

Detect and mitigate CVE-2026-31821 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 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

  • 2.0.16
  • 2.1.12
  • 2.2.3

Solution

Upgrade to versions 2.0.16, 2.1.12, 2.2.3 or above.

Impact 6.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-862: Missing Authorization

Source file

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

Spotted a mistake? Edit the file on GitLab.

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

Page generated Thu, 14 May 2026 12:19:29 +0000.