Vulnerability · Published Oct 7, 2024 · Assigned by GitHub_M
CVE-2024-47818Logged-in users with any role can delete arbitrary files in @saltcorn/server
Medium 6.5
In plain English
A medium-severity path traversal in saltcorn from saltcorn. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 56% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Saltcorn is an extensible, open source, no-code database application builder. A logged-in user with any role can delete arbitrary files on the filesystem by calling the `sync/clean_sync_dir` endpoint. The `dir_name` POST parameter is not validated/sanitized and is used to construct the `syncDir` that is deleted by calling `fs.rm`. This issue has been addressed in release version 1.0.0-beta16 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @saltcorn/server | 1.0.0-beta.16 | GHSA-43f3-h63w-p6f6 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/saltcorn/saltcorn/security/advisories/GHSA-43f3-h63w-p6f6 x_refsource_CONFIRM
- https://github.com/saltcorn/saltcorn/commit/3c551261d0e230635774798009951fa83a07cc3a x_refsource_MISC
- https://github.com/saltcorn/saltcorn/blob/v1.0.0-beta.15/packages/server/routes/sync.js#L337-L346 x_refsource_MISC