NVD Vulnerability Detail
Search Exploit, PoC
CVE-2020-4035
Summary

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

Publication Date June 4, 2020, 2:15 a.m.
Registration Date Jan. 26, 2021, 11:58 a.m.
Last Update Nov. 21, 2024, 2:32 p.m.
CVSS3.1 : MEDIUM
スコア 5.9
Vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR)
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I)
可用性への影響(A)
CVSS2.0 : MEDIUM
Score 5.5
Vector AV:N/AC:L/Au:S/C:N/I:P/A:P
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 単一
機密性への影響(C) なし
完全性への影響(I)
可用性への影響(A)
Get all privileges. いいえ
Get user privileges いいえ
Get other privileges いいえ
User operation required いいえ
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:nozbe:watermelondb:*:*:*:*:*:*:*:* 0.15.1
cpe:2.3:a:nozbe:watermelondb:0.16.1:*:*:*:*:*:*:*
cpe:2.3:a:nozbe:watermelondb:0.16.0:*:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
WatermelonDB における SQL インジェクションの脆弱性
Title WatermelonDB における SQL インジェクションの脆弱性
Summary

WatermelonDB (NPM パッケージ "@nozbe/watermelondb") には、SQL インジェクションの脆弱性が存在します。

Possible impacts 情報を改ざんされる、およびサービス運用妨害 (DoS) 状態にされる可能性があります。
Solution

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date June 1, 2020, midnight
Registration Date July 7, 2020, 1:50 p.m.
Last Update July 7, 2020, 1:50 p.m.
Affected System
Nozbe
WatermelonDB 0.15.1 未満
WatermelonDB 0.16.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2020年07月07日]
  掲載
July 7, 2020, 1:50 p.m.