HighGHSA-ph98-v78f-jqrmCVE-2021-43822

SQL injection in jackalope/jackalope-doctrine-dbal

Published 14 Dec 2021 · Updated 8 Jul 2026

Is your project on an affected jackalope/jackalope-doctrine-dbal?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<1.7.4
Fixed in
1.7.4
Update to the fixed version for your release line, for example:composer require jackalope/jackalope-doctrine-dbal:^1.7.4

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:

Is GHSA-ph98-v78f-jqrm in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected jackalope/jackalope-doctrine-dbal, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.