# CVE-2026-129355 — dufs WebDAV `COPY` overwrites existing files without the delete permission and ignores `Overwrite: F`
[ |
| **Component** | sigoden/dufs ≤ 0.46.0 — WebDAV COPY handler, `src/server.rs` |
| **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
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
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
`src/server.rs`, WebDAV `COPY` operation (dufs ≤ 0.46.0):
fs::copy(path, &dest).await?; // no existence check, no permission check, no Overwrite semantics
1. **delete permission** — overwriting an existing file destroys its
content, which dufs models as the *delete* permission; the handler
2. **RFC 4918 `Overwrite`** — the header was ignored entirely, so
`Overwrite: F` (do not overwrite an existing destination) silently
3. consequently a restricted instance (`--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
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
| `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
* `:8080` — `--allow-upload` (upload granted, **delete not granted** —
the restricted deployment of the advisory);
* `:8081` — `--allow-all` (full permissions — the `Overwrite: F`
./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
podman run --rm --network cve129355lab cve-2026-129355-poc:local \
* **check** — one `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.
* **exploit** — stage 1 destroys the marker's content with
attacker-supplied bytes as the restricted client; stage 2 shows
`Overwrite: F` being ignored on the permissive instance (`204` +
replaced) versus the fixed `412` with the content intact.
* **probe** — destination matrix: existing destination under
no-delete and all-permissions profiles, `Overwrite: F`/`T`/absent,
new-name baseline, subdirectory destination, and a traversal-shaped
`Destination` (rejected `400` on both sides — no additional exposure).
* **mitigation** — there is no runtime flag of 0.46.0 that repairs the
handler (granting delete would widen, not narrow, the exposure); the
remediation is the upstream fix, which is exactly the fixed side.
| 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`.
* Podman (or Docker) with network-creation rights; every container is
bounded to `--cpus 2 --memory 4g` on the isolated `cve129355lab`
* Outbound HTTPS at image build (clones github.com/sigoden/dufs and
## 7. Additional findings (0-day sweep on the fixed line)
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
run-lab.sh environment driver (build / up / sweep / down)
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)
* CVE record —
* VulDB entry —
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.
