
Safe local proof-of-concept for CVE-2026-104100, a path traversal in Teable's attachment presign API, with Docker Compose vulnerable and fixed environments for verification.
This repository contains a safe local proof of concept for CVE-2026-104100, based on Teable's public advisory GHSA-h4hg-45pv-pv8j.
The vulnerable attachment signature API accepts a client-controlled hash
without validating it and uses the value as a local-storage filename. A hash
containing ../ causes the subsequent upload to resolve outside the storage
directory, allowing a registered user to write or overwrite files with the
backend process's privileges. The official standalone container runs the
backend as root, so the resulting file is root-owned.
This PoC only creates a uniquely named marker under /tmp inside the test
container. It does not overwrite an existing file, execute code, or use an
external callback. The marker is removed automatically after verification.
This project is intended only for education and explicitly authorized security testing. Do not use it against systems or environments without permission.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)<= 1.10.0release.2026-07-20T11-53-25Z.2296Before the fix, the signature request schema accepted hash as an arbitrary
optional string:
hash: z.string().optional()
LocalStorage.presigned used that value as the upload filename:
const filename = hash ?? token;
const path = join(dir, filename);
The upload path was then resolved and copied to without checking that it stayed under the configured storage root:
const distPath = resolve(this.storageDir);
const newFilePath = resolve(distPath, rename);
await fse.copy(filePath, newFilePath);
The module already had an assertPathWithinStorage helper that rejects ..
and absolute paths, but the vulnerable implementation used it only on the read
path, not before a write.
The fix removes hash from the public signature schema so that a random,
server-generated token is always used as the stored filename.
The default image is the vulnerable 2026-07-15 release identified by the advisory.
docker compose up -d
Watch the logs while Teable starts. The first startup can take several minutes.
docker compose logs -f teable
Stop following the logs after http://127.0.0.1:3100 becomes available.
python3 exploit.py \
--target http://127.0.0.1:3100 \
--container cve-2026-104100-teable \
--expect vulnerable
Expected key output:
[!] VULNERABLE: the marker was written outside the storage directory.
[+] Marker ownership: 0:0
[+] Removed the temporary marker.
The PoC:
hash to /tmp.docker exec to verify the marker content and ownership.Stop the vulnerable environment and select the patched image listed in the advisory:
docker compose down -v
TEABLE_IMAGE=ghcr.io/teableio/teable:release.2026-07-20T11-53-25Z.2296 \
docker compose up -d
After startup, run the same PoC with the patched expectation:
python3 exploit.py \
--target http://127.0.0.1:3100 \
--container cve-2026-104100-teable \
--expect fixed
The patched version does not use the client-controlled hash as its storage
path, so the /tmp marker is not created.
docker compose down -v
/tmp/cve_2026_104100_<random>.txt.--allow-remote-target only in an explicitly authorized test environment.--keep-marker leaves the marker behind for manual inspection.Upgrade to release.2026-07-20T11-53-25Z.2296 or later. If an immediate upgrade
is not possible, avoid the local storage provider, disable self-registration,
and restrict access to the attachment signature API, including for low-privilege
users.