Sylius has a security vulnerability via adjustments API endpoint
Date: 2024-07
Affected: composer/sylius/sylius, composer/sylius/sylius, composer/sylius/sylius
Attack vector: other
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2024-40633
CWE: CWE-200
CWE-639
CVSS: 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

### 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 <!-- config/api_platform/Adjustment.xml --> ... <itemOperation name="shop_get"> <attribute name="method"


Mitigations:

Architectural layers (MAESTRO):