CVE-2022-28111 MyBatis PageHelper vulnerable to time-blind SQL injection via orderBy parameter

Critical 9.8 Published Updated

Attackers can execute time-blind SQL injection via the orderBy parameter in MyBatis PageHelper, potentially reading sensitive database information.

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

What is CVE-2022-28111?

CVE-2022-28111 is a critical SQL injection vulnerability in n/a, published on 4 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

MyBatis PageHelper v1.x.x-v3.7.0 v4.0.0-v5.0.0,v5.1.0-v5.3.0 was discovered to contain a time-blind SQL injection vulnerability via the orderBy parameter.

Weakness: CWE-89

Which versions are affected by CVE-2022-28111?

2 open source packages ship an affected version, including com.github.pagehelper:pagehelper. It affects 1 product.

PackageAffectedFixed in
com.github.pagehelper:pagehelper MavenFrom 3.5.05.3.1
com.github.pagehelper:pagehelper MavenFrom 3.5.05.3.1

Products include Pagehelper Project Pagehelper.

How do I fix CVE-2022-28111?

Upgrade com.github.pagehelper:pagehelper to 5.3.1 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-2022-28111 being exploited?

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

Sources

Also known as GHSA-w559-623p-vfg8.

Is CVE-2022-28111 in your software?

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

Check your SBOMs for free