ghsa-gvmf-wcx6-p974
Vulnerability from github
Published
2022-06-22 17:58
Modified
2022-07-11 19:29
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

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "pimcore/pimcore"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "10.4.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2022-31092"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-22T17:58:39Z",
    "nvd_published_at": "2022-06-27T22:15:00Z",
    "severity": "HIGH"
  },
  "details": "### Impact\nPimcore 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. \nThe actual issue is that quoting is not done properly in both cases, so there\u0027s 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. \n\n##### Example: \n```php\n// request url: https://example.com/foo?groupBy=o_id`; SELECT SLEEP(20);--\n\n$list = new DataObject\\Car\\Listing();\n$list-\u003esetOrderKey($request-\u003eget(\u0027orderBy\u0027));\n$list-\u003esetGroupBy($request-\u003eget(\u0027groupBy\u0027));\n$list-\u003eload();\n```\n\n### Patches\nUpgrade to \u003e= 10.4.4 or apply the following patch manually: \nhttps://github.com/pimcore/pimcore/commit/21559c6bf0e4e828d33ff7af6e88caecb5ac6549.patch\n\n### Workarounds\nApply this patch manually: \nhttps://github.com/pimcore/pimcore/commit/21559c6bf0e4e828d33ff7af6e88caecb5ac6549.patch\n\n### References\nhttps://github.com/pimcore/pimcore/pull/12444\n",
  "id": "GHSA-gvmf-wcx6-p974",
  "modified": "2022-07-11T19:29:18Z",
  "published": "2022-06-22T17:58:39Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/pimcore/pimcore/security/advisories/GHSA-gvmf-wcx6-p974"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31092"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pimcore/pimcore/pull/12444"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pimcore/pimcore/commit/21559c6bf0e4e828d33ff7af6e88caecb5ac6549"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/pimcore/pimcore"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Improper quoting of columns when using setOrderBy() or setGroupBy() on listing classes in Pimcore"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…