MediumGHSA-xcwx-r2gw-w93m
Sylius has a DQL Injection via API Order Filters
Affected versions
before 1.9.12, 1.10.0 to before 1.10.16, 1.11.0 to before 1.11.17, 1.12.0 to before 1.12.23, 1.13.0 to before 1.13.15, 1.14.0 to before 1.14.18, 2.0.0 to before 2.0.16, 2.1.0 to before 2.1.12, 2.2.0 to before 2.2.3 - fixed in 1.9.12Details
### Impact Sylius API filters `ProductPriceOrderFilter` and `TranslationOrderNameAndLocaleFilter` pass user-supplied order direction values directly to Doctrine's `orderBy()` without validation. An attacker can inject arbitrary DQL: ``` GET /api/v2/shop/products?order[price]=ASC,%20variant.code%20DESC ``` ### Patches The issue is fixed in 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 and above. ### Workarounds An `EventSubscriber` that sanitizes `order` query parameters **only on API routes** before they reach the vulnerable filters. The subscriber a
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected