5.9
MEDIUM
CVE-2020-4035
WatermelonDB SQL Injection Vulnerability
Description

In WatermelonDB (NPM package "@nozbe/watermelondb") before versions 0.15.1 and 0.16.2, a maliciously crafted record ID can exploit a SQL Injection vulnerability in iOS adapter implementation and cause the app to delete all or selected records from the database, generally causing the app to become unusable. This may happen in apps that don't validate IDs (valid IDs are `/^[a-zA-Z0-9_-.]+$/`) and use Watermelon Sync or low-level `database.adapter.destroyDeletedRecords` method. The integrity risk is low due to the fact that maliciously deleted records won't synchronize, so logout-login will restore all data, although some local changes may be lost if the malicious deletion causes the sync process to fail to proceed to push stage. No way to breach confidentiality with this vulnerability is known. Full exploitation of SQL Injection is mitigated, because it's not possible to nest an insert/update query inside a delete query in SQLite, and it's not possible to pass a semicolon-separated second query. There's also no known practicable way to breach confidentiality by selectively deleting records, because those records will not be synchronized. It's theoretically possible that selective record deletion could cause an app to behave insecurely if lack of a record is used to make security decisions by the app. This is patched in versions 0.15.1, 0.16.2, and 0.16.1-fix

INFO

Published Date :

June 3, 2020, 5:15 p.m.

Last Modified :

Nov. 21, 2024, 5:32 a.m.

Remotely Exploitable :

Yes !

Impact Score :

4.2

Exploitability Score :

1.6
Affected Products

The following products are affected by CVE-2020-4035 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Nozbe watermelondb
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2020-4035.

URL Resource
https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025 Patch Third Party Advisory
https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g Third Party Advisory
https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025 Patch Third Party Advisory
https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2020-4035 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2020-4035 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025
    Added Reference https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Jun. 11, 2020

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:S/C:N/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
    Changed Reference Type https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025 No Types Assigned https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025 Patch, Third Party Advisory
    Changed Reference Type https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g No Types Assigned https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:nozbe:watermelondb:*:*:*:*:*:*:*:* versions up to (excluding) 0.15.1 *cpe:2.3:a:nozbe:watermelondb:0.16.0:*:*:*:*:*:*:* *cpe:2.3:a:nozbe:watermelondb:0.16.1:*:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2020-4035 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.19 }} 0.02%

score

0.37526

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability
© cvefeed.io
Latest DB Update: Jul. 17, 2025 1:10