{"id":"CVE-2021-43822","aliases":["CVE-2021-43822","GHSA-ph98-v78f-jqrm"],"related":[],"kind":"vulnerability","state":"published","title":"SQL injection in jackalope/jackalope-doctrine-dbal","summary":"Jackalope Doctrine-DBAL is an implementation of the PHP Content Repository API (PHPCR) using a relational database to persist data. In affected versions users can provoke SQL injections if they can specify a node name or query. Upgrade to version 1.7.4 to resolve this issue. 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)`. 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Jackalope Doctrine-DBAL is an implementation of the PHP Content Repository API (PHPCR) using a relational database to persist data. In affected versions users can provoke SQL injections if they can specify a node name or query. Upgrade to version 1.7.4 to resolve this issue. 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)`. 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.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Jackalope Doctrine-DBAL es una implementación de la API de Repositorio de Contenido PHP (PHPCR) que usa una base de datos relacional para persistir los datos. En las versiones afectadas los usuarios pueden provocar inyecciones SQL si pueden especificar un nombre de nodo o una consulta. Actualice a versión 1.7.4 para resolver este problema. Si no es posible, puede escapar de todos los lugares donde es usado \"$property\" para filtrar \"sv:name\" en la clase \"Jackalope\\Transport\\DoctrineDBAL\\Query\\QOMWalker\": \"XPath::escape($property)\". Los nombres de nodo y los xpaths pueden contener \"\"\" o \";\" según la especificación JCR. El componente jackalope que traduce el modelo de objetos de consulta en consultas dbal de la doctrina no escapa adecuadamente los nombres y rutas, por lo que un nombre de nodo convenientemente elaborado puede llevar a una inyección SQL. Si las consultas nunca son realizadas a partir de la entrada del usuario, o si es comprobada la entrada del usuario para que no contenga \";\", no está afectado","source":"nvd"}],"published":"2021-12-13T19:50:11.000Z","modified":"2026-07-08T06:27:47.086Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 1.7.4","status":"affected"}],"vendor":"jackalope","product":"jackalope-doctrine-dbal","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.7.4"}],"ecosystem":"Packagist","package":"jackalope/jackalope-doctrine-dbal","purl":"pkg:composer/jackalope/jackalope-doctrine-dbal","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.7.4"}],"vendor":"jackalope_doctrine-dbal_project","product":"jackalope_doctrine-dbal","cpe":"cpe:2.3:a:jackalope_doctrine-dbal_project:jackalope_doctrine-dbal:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/jackalope/jackalope-doctrine-dbal/security/advisories/GHSA-ph98-v78f-jqrm","tags":["mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jackalope/jackalope-doctrine-dbal/commit/9d179a36d320330ddb303ea3a7c98d3a33d231db","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43822","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jackalope/jackalope-doctrine-dbal","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43822","url":"https://www.cve.org/CVERecord?id=CVE-2021-43822","licence":"CVE Terms of Use","modified":"2024-08-04T04:03:08.861Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ph98-v78f-jqrm","url":"https://github.com/advisories/GHSA-ph98-v78f-jqrm","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:47.086Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43822","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43822","licence":"Public domain","modified":"2026-06-17T04:11:30.757Z"}],"updatedAt":"2026-11-25T22:24:36.220Z","epss":{"score":0.00999,"percentile":0.63723,"date":"2026-12-01T12:00:22.000Z"}}