SQL Injection Affecting doctrine/dbal package, versions >=3.0.0, <3.1.4


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.23% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-DOCTRINEDBAL-1921202
  • published16 Nov 2021
  • disclosed16 Nov 2021
  • creditUnknown

Introduced: 16 Nov 2021

CVE-2021-43608  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade doctrine/dbal to version 3.1.4 or higher.

Overview

Affected versions of this package are vulnerable to SQL Injection via the LIMIT Clause Generation API. 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.

References

CVSS Scores

version 3.1