GHSA-PH98-V78F-JQRM

Vulnerability from github – Published: 2021-12-14 21:08 – Updated: 2021-12-14 15:25
VLAI?
Summary
SQL injection in jackalope/jackalope-doctrine-dbal
Details

Impact

Users can provoke SQL injections if they can specify a node name or query.

Patches

Upgrade to version 1.7.4

If that is not possible, you can escape all places where $property is used to filter sv:name in the class Jackalope\Transport\DoctrineDBAL\Query\QOMWalker: XPath::escape($property).

Workarounds

Node names and xpaths can contain " or ; according to the JCR specification. The jackalope component that translates the query object model into doctrine dbal queries does not properly escape the names and paths, so that a accordingly crafted node name can lead to an SQL injection.

If queries are never done from user input, or if you validate the user input to not contain ;, you are not affected.

References

No further references.

For more information

If you have any questions or comments about this advisory:

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "jackalope/jackalope-doctrine-dbal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.7.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-43822"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-12-14T15:25:41Z",
    "nvd_published_at": "2021-12-13T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "### Impact\n\nUsers can provoke SQL injections if they can specify a node name or query.\n\n### Patches\n\nUpgrade to version 1.7.4\n\nIf that is not possible, you can escape all places where `$property` is used to filter `sv:name` in the class `Jackalope\\Transport\\DoctrineDBAL\\Query\\QOMWalker`: `XPath::escape($property)`.\n\n### Workarounds\n\nNode names and xpaths can contain `\"` or `;` according to the JCR specification. The jackalope component that translates the query object model into doctrine dbal queries does not properly escape the names and paths, so that a accordingly crafted node name can lead to an SQL injection.\n\nIf queries are never done from user input, or if you validate the user input to not contain `;`, you are not affected. \n\n### References\n\nNo further references.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [jackalope/jackalope-doctrine-dbal repo](https://github.com/jackalope/jackalope-doctrine-dbal/issues)\n",
  "id": "GHSA-ph98-v78f-jqrm",
  "modified": "2021-12-14T15:25:41Z",
  "published": "2021-12-14T21:08:13Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/jackalope/jackalope-doctrine-dbal/security/advisories/GHSA-ph98-v78f-jqrm"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-43822"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jackalope/jackalope-doctrine-dbal/commit/9d179a36d320330ddb303ea3a7c98d3a33d231db"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/jackalope/jackalope-doctrine-dbal"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SQL injection in jackalope/jackalope-doctrine-dbal"
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…