CVE-2021-43608 DBAL 3 SQL Injection Security Vulnerability

Critical 9.8 Published Updated

SQL injection vulnerability in Doctrine DBAL allows attackers to manipulate database queries via unescaped user input in limit clauses.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-43608?

CVE-2021-43608 is a critical SQL injection vulnerability in n/a, published on 9 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Doctrine DBAL 3.x before 3.1.4 allows SQL Injection. The escaping of offset and length inputs to the generation of a LIMIT clause was not probably cast to an integer, allowing SQL injection to take place if application developers passed unescaped user input to the DBAL QueryBuilder or any other API that ultimately uses the AbstractPlatform::modifyLimitQuery API.

Weakness: CWE-89

Which versions are affected by CVE-2021-43608?

2 open source packages ship an affected version, including doctrine/dbal. It affects 1 product.

PackageAffectedFixed in
doctrine/dbal PackagistFrom 3.0.03.1.4
doctrine/dbal PackagistFrom 3.0.03.1.4

Products include Doctrine-Project Database Abstraction Layer.

How do I fix CVE-2021-43608?

Upgrade doctrine/dbal to 3.1.4 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2021-43608 being exploited?

There is no known exploitation of CVE-2021-43608 in the wild and no public exploit code.

Sources

Also known as GHSA-r7cj-8hjg-x622, UBUNTU-CVE-2021-43608.

Is CVE-2021-43608 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free