Skip to content

DBAL 3 SQL Injection Security Vulnerability

Critical severity GitHub Reviewed Published Nov 15, 2021 in doctrine/dbal • Updated Feb 6, 2024

Package

composer doctrine/dbal (Composer)

Affected versions

>= 3.0.0, < 3.1.4

Patched versions

3.1.4

Description

We have released a new version Doctrine DBAL 3.1.4 that fixes a critical SQL injection vulnerability in the LIMIT clause generation API provided by the Platform abstraction.

We advise everyone using Doctrine DBAL 3.0.0 up to 3.1.3 to upgrade to 3.1.4 immediately.

The vulnerability can happen when unsanitized input is passed to many APIs in Doctrine DBAL and ORM that ultimately end up calling AbstractPlatform::modifyLimitQuery.

As a workaround you can cast all limit and offset parameters to integers before passing them to Doctrine APIs.

This vulnerability has been assigned CVE-2021-43608.

References

@beberlei beberlei published to doctrine/dbal Nov 15, 2021
Reviewed Nov 15, 2021
Published to the GitHub Advisory Database Nov 16, 2021
Published by the National Vulnerability Database Dec 9, 2021
Last updated Feb 6, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2021-43608

GHSA ID

GHSA-r7cj-8hjg-x622

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.