GitHub Advisoryadvisory · Packagist

GHSA-55rf-8q29-4g43 Sylius has a security vulnerability via adjustments API endpoint

HIGH Published 2024-07-17 Modified 2026-03-09 Official page ↗
Aliases
CVE-2024-40633
Ecosystem
Packagist
Packages
sylius/sylius
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-200, CWE-639
Reviewed
2024-07-17

Affected packages

• Packagist sylius/sylius: >= 1.12.0-alpha.1, < 1.12.19 → fixed in 1.12.19 • Packagist sylius/sylius: >= 1.13.0-alpha.1, < 1.13.4 → fixed in 1.13.4 • Packagist sylius/sylius: < 1.9.12 → fixed in 1.9.12 • Packagist sylius/sylius: >= 1.10.0-alpha.1, < 1.10.16 → fixed in 1.10.16 • Packagist sylius/sylius: >= 1.11.0-alpha.1, < 1.11.17 → fixed in 1.11.17

Description

Impact A security vulnerability was discovered in the `/api/v2/shop/adjustments/{id}` endpoint, which retrieves order adjustments based on incremental integer IDs. The vulnerability allows an attacker to enumerate valid adjustment IDs and retrieve order tokens. Using these tokens, an attacker can access guest customer order details - sensitive guest customer information. Patches The issue is fixed in versions: 1.9.12, 1.10.16, 1.11.17, 1.12.19, 1.13.4 and above. The `/api/v2/shop/adjustments/{id}` will always return `404` status. Workarounds Using YAML configuration: Create `config/api_platform/Adjustment.yaml` file: ```yaml config/api_platform/Adjustment.yaml '%sylius.model.adjustment.class%': itemOperations: shop_get: controller: ApiPlatform\Core\Action\NotFoundAction read: false output: false ``` Or using XML configuration: > Note: This is the only way of disabling the vulnerable endpoint for Sylius 1.9, as YAML configuration is not supported in that version. Copy the original configuration from vendor: ```bash create directory if it doesn't exist mkdir -p config/api_platform cp vendor/sylius/sylius/src/Sylius/Bundle/ApiBundle/Resources/config/api_resources/Adjustment.xml config/api_platform ``` And change the `shop_get` operation in copied `config/api_platform/Adjustment.xml` file: ```xml ... GET /shop/adjustments/{id} ApiPlatform\Core\Action\NotFoundAction false false ... ``` Update your API platform paths config if needed so the new configuration file is loaded: ```yaml config/packages/api_platform.yaml api_platform: mapping: paths: • '%kernel.project_dir%/vendor/sylius/sylius/src/Sylius/Bundle/ApiBundle/Resources/config/api_resources' ... • '%kernel.project_dir%/config/api_platform' ``` For more information If you have any questions or comments about this advisory: • Open an issue in Sylius issues • Email us at [email protected]

Related

Alias · CVE (1)

  • CVE-2024-40633 Sylius is an Open Source eCommerce Framework on Symfony. vulnerability

Weakness · CWE (2)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness
  • CWE-639 Authorization Bypass Through User-Controlled Key weakness

References