
dufs <=0.46.0 WebDAV COPY: overwrites existing destinations without the delete permission and ignores Overwrite: F (CWE-863). Both sides compiled from upstream (v0.46.0 vs fix commit fba13df): vuln 204+content replaced on every form; fixed 403/412 intact.
COPY overwrites existing files without the delete permission and ignores Overwrite: F| CVE | CVE-2026-129355 (VDB-437418) |
| Component | sigoden/dufs ≤ 0.46.0 — WebDAV COPY handler, src/server.rs |
| Affected | dufs 0.1.0 – 0.46.0 |
| Fixed in | the fix commit fba13dffb9c65b5e5e26419f64de709200277a04 ("fix: prevent COPY from overwriting existing files without delete permission"), released in 0.47.0 |
| CWE | CWE-863 (Incorrect Authorization), CWE-285 (Improper Authorization) |
| Impact | A client of a deployment that grants upload but not delete can overwrite — i.e. destroy the content of — any existing file reachable by the served tree; no deployment can rely on RFC 4918 Overwrite: F preconditions |
| Vector | Network — one authenticated/ACL-scoped WebDAV COPY request with a Destination naming an existing file |
| Trigger | COPY /attacker.txt with Destination: …/secret.html — 0.46.0 answers 204 and replaces the content; the fixed tree answers 403 (no delete permission) or 412 (Overwrite: F) |
| CVSS | per VulDB (High band); data integrity destruction of the served tree |
dufs is a single-binary file server with WebDAV support. Its COPY
handler copied source to destination unconditionally — the upstream fix
adds exactly the two missing guards:
ensure_path_parent(&dest).await?;
let overwrite = req.headers().get("overwrite")
.map(|v| v.as_bytes() != b"F").unwrap_or(true);
if fs::symlink_metadata(&dest).await.is_ok() { // destination exists
if !overwrite { *res.status_mut() = StatusCode::PRECONDITION_FAILED; return Ok(()); }
if !self.args.allow_delete { status_forbid(res); return Ok(()); } // ← the missing check
}
fs::copy(path, &dest).await?;
This laboratory compiles both sides from the upstream repository — the
vulnerable tag v0.46.0 and the tree at the fix commit — and drives them
with the exact scenarios of the upstream regression tests
(tests/webdav.rs), plus a wider destination/Overwrite/traversal
matrix.
src/server.rs, WebDAV COPY operation (dufs ≤ 0.46.0):
ensure_path_parent(&dest).await?;
fs::copy(path, &dest).await?; // no existence check, no permission check, no Overwrite semantics
status_no_content(res);
Three guarantees are missing at once:
allow_delete;Overwrite — the header was ignored entirely, so
Overwrite: F (do not overwrite an existing destination) silently
overwrote anyway;--allow-upload without
--allow-delete, or an ACL user with upload-only rights) lets any
client replace every existing file's content with attacker-chosen
bytes.The upstream regression tests added with the fix specify the expected
behaviour this lab reproduces verbatim: 403 for a copy onto an
existing destination without delete permission, 412 for
Overwrite: F, and the destination's original content intact in both
cases.
| service | image | role |
|---|---|---|
dufs-vuln | cve-2026-129355:lab, LAB_DUFUS_VARIANT=vuln | dufs v0.46.0 built from the upstream tag |
dufs-fixed | cve-2026-129355:lab, LAB_DUFUS_VARIANT=fixed | dufs at the upstream fix commit fba13df (both compiled at image build; the fix commit does not bump Cargo.toml, so both binaries self-report "0.46.0" — see evidence/versions.txt) |
poc | cve-2026-129355-poc:local | stdlib-only Python driver |
Each container runs two instances over the same seeded tree, mirroring
the upstream tests' fixtures (test.txt, test.html, an integrity
marker secret.html, subdir/note.md):
:8080 — --allow-upload (upload granted, delete not granted —
the restricted deployment of the advisory);:8081 — --allow-all (full permissions — the Overwrite: F
semantics case)../run-lab.sh build # compiles dufs v0.46.0 and the fba13df tree
./run-lab.sh up # cve129355lab network, dufs-vuln, dufs-fixed
./run-lab.sh sweep # check / exploit / probe / mitigation on both sides
./run-lab.sh down
Single mode against one side:
podman run --rm --network cve129355lab cve-2026-129355-poc:local \
exploit --host=dufs-vuln
poc/poc.py (stdlib only):
COPY over the integrity marker on the restricted
instance: 204 + replaced content (vulnerable) vs 403 + intact
(fixed). Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.Overwrite: F being ignored on the permissive instance (204 +
replaced) versus the fixed 412 with the content intact.Overwrite: F/T/absent,
new-name baseline, subdirectory destination, and a traversal-shaped
Destination (rejected 400 on both sides — no additional exposure).| run | dufs-vuln (v0.46.0) | dufs-fixed (fba13df) |
|---|---|---|
check (COPY over existing, no-delete) | 204, marker replaced | 403, marker intact |
exploit stage 1 (content destruction) | attacker bytes in place | 403, intact |
exploit stage 2 (Overwrite: F, all-perms) | 204, replaced | 412, intact |
probe Overwrite: T/absent, no-delete | 204, replaced | 403, intact |
probe new-name / subdir baseline | 204 (legitimate copy) | 204 (legitimate copy) |
probe all-perms overwrite | 204, replaced (delete granted — correct) | 204, replaced (correct) |
probe traversal Destination (../..) | 400 | 400 |
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.
--cpus 2 --memory 4g on the isolated cve129355lab
network.The probe matrix doubles as the surface sweep over the fixed tree —
every destination shape (existing, new, subdirectory, traversal) and
Overwrite value under both permission profiles. On the fixed side
every overwrite form is refused (403) or preconditioned (412),
legitimate new-file copies are unaffected, and the traversal-shaped
Destination is rejected on both sides. No additional unprotected path
was found (evidence/0day-sweep.txt).
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/lab.Dockerfile multi-stage image (compiles both upstream trees)
lab/entrypoint.sh starts the two dufs instances of the variant
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)