GHSA-gvmf-wcx6-p974

    Dashboard / Vulnerabilities / GHSA-gvmf-wcx6-p974

    GHSA-gvmf-wcx6-p974

    Published: 22 Jun 2022Last Modified: 8 Nov 2023

    Summary: Improper quoting of columns when using setOrderBy() or setGroupBy() on listing classes in Pimcore

    Details: ### Impact Pimcore offers developers listing classes to make querying data easier. This listing classes also allow to order or group the results based on one or more columns which should be quoted by default. The actual issue is that quoting is not done properly in both cases, so there's the theoretical possibility to inject custom SQL if the developer is using this methods with input data and not doing proper input validation in advance and so relies on the auto-quoting being done by the listing classes. ##### Example: ```php // request url: https://example.com/foo?groupBy=o_id`; SELECT SLEEP(20);-- $list = new DataObject\Car\Listing(); $list->setOrderKey($request->get('orderBy')); $list->setGroupBy($request->get('groupBy')); $list->load(); ``` ### Patches Upgrade to >= 10.4.4 or apply the following patch manually: https://github.com/pimcore/pimcore/commit/21559c6bf0e4e828d33ff7af6e88caecb5ac6549.patch ### Workarounds Apply this patch manually: https://github.com/pimcore/pimcore/commit/21559c6bf0e4e828d33ff7af6e88caecb5ac6549.patch ### References https://github.com/pimcore/pimcore/pull/12444

    Affected packages

    Package

    Name: pimcore/pimcore

    Purl: pkg:composer/pimcore/pimcore

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -10.4.4

    Affected versions

    10.0.8

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-gvmf-wcx6-p974 | CVE-DB