---
type: Code
title: "fortbridge/cve-2026-108097-research: docs/UPLOAD-STAGED-WITNESS.md"
description: Shows anonymous Webform private uploads staging payload files for a conditional Drupal callback chain involving PEAR copy/delete operations and Apache configuration. The callback writer remains synthetic; controls check missing files, blocked paths and cleanup.
resource: "https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md"
tags: [code, webseclist-reference, en, github, drupal, file-upload, file-write, gadget-chain, apache, owasp-a08-2021]
generated:
  by: webseclist-refs/1
  at: "2026-10-21T11:50:17+00:00"
status: stable
stale_after: 2027-10-21
sources:
  - id: original
    resource: "https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md"
    title: "fortbridge/cve-2026-108097-research: docs/UPLOAD-STAGED-WITNESS.md"
also_at: []
authors: []
canonical_url: ""
cited_by:
  - "2026-ai.md:97"
commit: ""
content_sha256: 238e01c0e60b51cd950ba1b6684f307954734d0d22682944026afa41c8d9e84b
depth: full
depth_reason: default
kind: code
language: en
licence: unknown
original_url: "https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md"
published: ""
publisher: GitHub
publisher_english: ""
raw_sha256: 238e01c0e60b51cd950ba1b6684f307954734d0d22682944026afa41c8d9e84b
retrieved_from: "https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md"
retrieved_kind: github-api
retrieved_utc: "2026-10-21T11:50:17+00:00"
slug: github-fortbridge-cve-2026-108097-research-docs-upload-staged-witness-md
snapshot: ""
title_english: ""
translation_file: ""
translation_of: ""
---

# fortbridge/cve-2026-108097-research: docs/UPLOAD-STAGED-WITNESS.md

**fortbridge/cve-2026-108097-research: docs/UPLOAD-STAGED-WITNESS.md** - Author not stated, GitHub.

- Published: date not stated
- Original: <https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md>
- Preserved from: https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md (github-api) on 2026-10-21
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so
it remains readable if the page goes offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

> **Repository reading copy.** Created from [UPLOAD-STAGED-WITNESS.md](https://github.com/fortbridge/cve-2026-108097-research/blob/1b8509713064e440068b0561eaf4a2a458831b2b/docs/UPLOAD-STAGED-WITNESS.md).

# UPLOAD-STAGED-WITNESS.md

`fortbridge/cve-2026-108097-research` at `1b8509713064`, path `docs/UPLOAD-STAGED-WITNESS.md`.

# Upload-staged variant (webrce4): no pre-staged files, stock upload path only

18 October 2026. Extends the webrce3 chain to answer the objection "the payloads were
pre-staged in `/tmp/lab-gadget-src/`". Here the payload sources are planted through
**Drupal's own unauthenticated file upload**, nothing else changes.

## The staging path (all stock, all default posture)

- The lab has Webform enabled with a `managed_file` element on a form open to
  **unauthenticated** users (`/form/lab-upload`).
- Webform's default for such uploads is `private://` (its PSA-2016-003 hardening:
  `webform.settings:file.file_public` is OFF and public is unset unless an admin opts
  in). So this demonstration uses the **secure default**, not a misconfiguration.
- Anonymous multipart POST of two files to the form returns fids; on disk they land at
  `sites/default/files/private/webform/lab_upload/_sid_/`:
  - `payload.php_.txt`, Drupal's `file_munge_filename` renames `.php.` to `.php_.`,
    which is irrelevant: `System::cat` copies by content, and the destination name is
    chosen in the row.
  - `htaccess.txt`, the crafted `RewriteEngine On` + `php_flag engine on`.

## The chain (webrce4)

Identical three rows to webrce3, but both `System::cat` sources are the uploaded files
(allowlisted in the bridge to the webform upload tree, `.txt` only):

```
GET /lab-field-ui-probe?choice=webrce4&nonce=upstg01
    &src_php=/opt/drupal/web/sites/default/files/private/webform/lab_upload/_sid_/payload.php_.txt
    &src_ht=/opt/drupal/web/sites/default/files/private/webform/lab_upload/_sid_/htaccess.txt
```

row1 `System::cat` uploads payload → `files/lab-rce-upstg01.php`; row2 `System::rm`
deletes `files/.htaccess`; row3 `System::cat` uploads htaccess.txt → `files/.htaccess`.

## Result (11.4.9, unauthenticated throughout)

Full harness: `witnesses/blogshot_rce_upload.sh` (does the upload, the chain, and the marker GET in one run).

```
GET /sites/default/files/lab-rce-upstg01.php -> 200
LAB-RCE-EXEC nonce=uploadstage1 id=uid=33(www-data) gid=33(www-data) groups=33(www-data) whoami=www-data
```

Patched control (11.4.10): probe 200 (no-op), marker GET 404, nothing written.

## Negative control: the same chain with NO payload files at all

With the staging directory hidden, the same chain degrades to: empty marker file (0
bytes), empty `files/.htaccess`, and the marker GET still 403s, because an empty
`.htaccess` has no `RewriteEngine On` and the parent's PHP-block `[F]` rule still
inherits. The `rm` row still runs, so even a failed attempt strips the files-dir
hardening. (Both verified 2026-10-18; lab restored byte-identical after.)

## What this proves

The "you need a writable payload source" precondition is satisfied by Drupal itself:
any stock upload feature (webform private uploads shown here; comment attachments,
file fields, profile pictures are equivalent) gives an unauthenticated attacker a
www-data-readable file with attacker-chosen content at a known path. The only
remaining synthetic joint is still the writer (request data into `#region_callback`).
