Medium, CVSS 5.9npmAmendedPublished
DoS via malicious record IDs in WatermelonDB
CVE-2020-4035 · GHSA-38f9-m297-6q9g
- Affected
- npm @nozbe/watermelondb < 0.15.1; >= 0.16.0, < 0.16.2
- Fixed in
- 0.15.10.16.2· Vendor fix available
- Issue
- Impact Medium severity 5.9 https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H 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…
Recommended action: Upgrade to 0.16.2 or 0.15.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.