CVE-2023-40121 SQL injection in Android

Medium 5.5 Published Updated

A local attacker can exploit unsafe deserialization in Android's DatabaseUtils to perform SQL injection and disclose information.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-40121?

CVE-2023-40121 is a medium-severity SQL injection vulnerability in Google Android, published on 27 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In appendEscapedSQLString of DatabaseUtils.java, there is a possible SQL injection due to unsafe deserialization. This could lead to local information disclosure with User execution privileges needed. User interaction is not needed for exploitation.

Weakness: CWE-502

Which versions are affected by CVE-2023-40121?

It affects 1 product.

Products include Google Android.

How do I fix CVE-2023-40121?

Apply the vendor's patch.

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-2023-40121 being exploited?

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

All Google Android vulnerabilities

Sources

Also known as A-224771621, ASB-A-224771621, GHSA-vvc5-h94x-p72m.

Is CVE-2023-40121 in your software?

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

Check your SBOMs for free