{"id":"GHSA-38f9-m297-6q9g","revision":null,"records":[{"revision":"ce0fdb9ef4f64d3ebfbea0fd2ca95f73","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2020-4035","aliases":[],"title":"DoS or local data modification via malicious record IDs in WatermelonDB","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","state":0,"publishedAt":"2020-06-03T16:50:12+00:00","modifiedAt":"2024-08-04T07:52:20.76+00:00","affected":[{"ecosystem":"Vendor product","name":"WatermelonDB","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"WatermelonDB\",\n                    \"vendor\": \"Nozbe\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"< 0.15.1\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \">= 0.16.0, < 0.16.2\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"severity":"MEDIUM"}],"references":["https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g","https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2020-4035","license":"CVE Program Terms of Use","key":"cve-program:CVE-2020-4035","identifiers":["CVE-2020-4035"]},"retained":false,"historicalAffected":[]},{"revision":"a7f6dffc000c4ff4baef8471c17281d2","observedAt":"2026-11-24T02:27:03.322+00:00","statement":{"source":"euvd","id":"EUVD-2020-0454","aliases":["CVE-2020-4035","GHSA-38f9-m297-6q9g"],"title":"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 recor…","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","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"severity":null}],"references":["https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g","https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2020-0454","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 3, 2020, 4:50:12 PM","dateUpdated":"Aug 4, 2024, 7:52:20 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2020-0454","identifiers":["EUVD-2020-0454","CVE-2020-4035","GHSA-38f9-m297-6q9g"]},"retained":false,"historicalAffected":[]},{"revision":"7ebac5beb8a843f5baed3a9bff0debf2","observedAt":"2026-10-24T17:17:15.461+00:00","statement":{"source":"nvd","id":"CVE-2020-4035","aliases":[],"title":"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 recor…","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","state":0,"publishedAt":"2020-06-03T17:15:26.153+00:00","modifiedAt":"2026-06-17T03:19:27.6+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"severity":"MEDIUM"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":5.9,"severity":"MEDIUM"},{"system":"CVSS 2.0 · nvd@nist.gov · Primary","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:P","score":5.5,"severity":"MEDIUM"}],"references":["https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025","https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2020-4035","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-89"],"productCriteria":["cpe:2.3:a:nozbe:watermelondb:*:*:*:*:*:*:*:*","cpe:2.3:a:nozbe:watermelondb:0.16.0:*:*:*:*:*:*:*","cpe:2.3:a:nozbe:watermelondb:0.16.1:*:*:*:*:*:*:*"],"sourceDates":{"published":"2020-06-03T17:15:26.153","lastModified":"2026-06-17T03:19:27.600"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2020-4035","identifiers":["CVE-2020-4035"]},"retained":false,"historicalAffected":[]},{"revision":"4f29539dac984bce918cf0b3dc46b03e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-38f9-m297-6q9g","aliases":["CVE-2020-4035"],"title":"DoS via malicious record IDs in WatermelonDB","description":"## Impact\n\nMedium 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\n\nA 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.\n\nThis 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.\n\nThe 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.\n\nNo 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.\n\nIt'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. \n\n## Patches\n\nPatched versions include:\n\n- 0.15.1\n- 0.16.2\n- 0.16.1-fix\n\t- this is actually the same as 0.16.0, but with the patch applied - as 0.16.1 is causing issues for some users\n- `924c7ae2a8d` commit id contains the patch\n\n## Workarounds\n\n1. Ensure that your backend service sanitizes record IDs sent in the `pull sync` endpoint, such that only IDs matching `/^[a-zA-Z0-9_-.]+$/` are returned. This could also be done in JavaScript `pullChanges` function passed to `synchronize()`\n2. If you use `destroyDeletedRecords` directly, validate all IDs passed the same way\n\n## For more information\n\nIf you have any questions about this advisory, contact @radex.","state":0,"publishedAt":"2020-06-03T21:57:53+00:00","modifiedAt":"2026-07-08T06:28:24.3566421+00:00","affected":[{"ecosystem":"npm","name":"@nozbe/watermelondb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.15.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@nozbe/watermelondb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.16.0"},{"kind":"fixed","version":"0.16.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/Nozbe/WatermelonDB/security/advisories/GHSA-38f9-m297-6q9g","https://nvd.nist.gov/vuln/detail/CVE-2020-4035","https://github.com/Nozbe/WatermelonDB/commit/924c7ae2a8d7d6459656751e5b9b1bf91a218025"],"sourceUrl":"https://github.com/advisories/GHSA-38f9-m297-6q9g","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-38f9-m297-6q9g","identifiers":["GHSA-38f9-m297-6q9g","CVE-2020-4035"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T15:30:40.6081624+00:00","complete":true,"records":1796,"lastAttemptAt":"2026-11-25T15:30:40.6081624+00:00","lastSuccessAt":"2026-11-25T15:30:40.8059403+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:40.8059408+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-c8a5bbe81e5c97f1ef0204d9f424811c3ab0e015216b17be9cd9061ec365cc09","complete":true,"records":432153,"lastAttemptAt":"2026-11-25T15:28:37.3830721+00:00","lastSuccessAt":"2026-11-25T15:28:37.2582332+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:28:37.3830721+00:00","snapshotPublishedAt":"2026-11-25T14:30:07+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-5922d9804a9248789f8c2f7e9396c714","complete":false,"records":13938,"lastAttemptAt":"2026-11-25T15:41:09.4114251+00:00","lastSuccessAt":"2026-11-25T15:41:09.407+00:00","error":"129 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T15:41:09.407+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13600,"expectedIdentifiers":13986,"failedIdentifiers":129},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T15:30:40.6081624+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T15:30:40.6081624+00:00","lastSuccessAt":"2026-11-25T15:30:40.8067671+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:40.8067672+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-91a1844a9c234a33bf5df077b2f01fa3","complete":true,"records":13950,"lastAttemptAt":"2026-11-25T15:30:41.8818771+00:00","lastSuccessAt":"2026-11-25T15:30:41.877+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:41.877+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13986,"expectedIdentifiers":13986,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-70b1e3058f76fab20c77bb1c4924a4c57f7654dd208befb5b1f237e682d6ddca","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T15:30:40.4787181+00:00","lastSuccessAt":"2026-11-25T11:46:59.5507764+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:40.4787181+00:00","snapshotPublishedAt":"2026-11-25T11:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T15:28:37.4627555+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:28:37.4627555+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-5be533520b83c9bfaebc80695093f6f0d59feafc2a1eab94e91dd79d1bb9241b","complete":true,"records":3222,"lastAttemptAt":"2026-11-25T15:30:40.5768219+00:00","lastSuccessAt":"2026-11-25T11:47:03.6026853+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:40.5768219+00:00","snapshotPublishedAt":"2026-11-25T11:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-5747fce78879ab80d0039caa02f9d28c583bbc680a45e25fa53cb124697761ff","complete":true,"records":233128,"lastAttemptAt":"2026-11-25T15:30:40.354568+00:00","lastSuccessAt":"2026-11-25T15:30:39.1946895+00:00","error":null,"lastVerifiedAt":"2026-11-25T15:30:40.354568+00:00","snapshotPublishedAt":"2026-11-25T15:03:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}