
PoC and lab for CVE-2026-103035, a missing-authorization flaw in TeamPass update_folder that lets any non-read-only user move another team's folder subtree into their personal space.
update_folder enables cross-team folder theft| CVE | CVE-2026-103035 |
| Component | TeamPass — app/sources/folders.queries.php, update_folder action |
| Affected | 2f271cdd (3.2.1.1), also present in 3.1.3.1 and 3.1.7.6 |
| Fixed in | commit e022b27 (Fix missing authorization in folders update_folder action, GHSA-66q9-mxf2-xqw6) |
| CWE | CWE-639 (Authorization Bypass Through User-Controlled Key), CWE-862 (Missing Authorization) |
| Impact | Any authenticated non-read-only user can rename, re-parent and convert to personal any folder in the instance. A user can move another team's credential subtree into their own personal space, removing it from the organization while retaining access to its contents. The update_folder action dispatches the ID and parent ID from the request without checking either against the caller's accessible folders, unlike sibling actions in the same file |
| Vector | Authenticated POST folders.queries.php with action=update_folder and attacker-chosen id / parentId |
| Trigger | target folder ID outside user-accessible_folders, parentId pointing at the attacker's personal folder |
The pre-fix action performed the DB update with no authorization checks:
// folders.queries.php — pre-fix
// no check that $inputData['id'] is in user-accessible_folders
// no check that $inputData['parentId'] is accessible
// no check that personal/shared domains match
The fix adds three guards at the exact mutation points:
// fixed (commit e022b27) — verbatim excerpts
if ((int) $session->get('user-admin') !== 1
&& in_array((int) $inputData['id'],
array_map('intval', (array) $session->get('user-accessible_folders')), true) === false) {
echo prepareExchangedData(array('error' => true, ...), 'encode');
break;
}
// ... identical check for $inputData['parentId'] when moving ...
// ... cross-domain check: (int) $dataFolder['personal_folder'] !== (int) $isPersonal ...
update_folder accepted the folder ID and destination parent ID from the
request and updated the folder tree with both, never comparing them to the
caller's user-accessible_folders. There was also no check that the source
folder and the destination belonged to the same domain (organization-shared
vs personal). A regular user could therefore target any folder ID, rename or
re-parent it, and mark it personal — transferring the subtree's credentials
into their private space and hiding them from the team. The fix adds three
authorization checks before the mutation: the target folder must be
accessible, the destination parent must be accessible (root excepted), and
shared↔personal conversions are rejected for non-admins. A global session
gate was also added to the file for unauthenticated requests.
| service | image | role |
|---|---|---|
tp-vuln | cve-2026-103035:vuln | folders.queries.php at e022b27^ — no guards |
tp-fixed | cve-2026-103035:fixed | e022b27 — three verbatim guard blocks |
poc | cve-2026-103035-poc:local | stdlib-only Python driver |
The PHP harness runs the verbatim upstream guard blocks from the fix
commit inside a do { ... } while (false) so their native break statements
exit the simulated action, with minimal stubs for session, language and the
exchange encoder. Modes: attack (other team's folder → personal), admin
(maintenance move) and shared_move (ordinary shared-to-shared move).
./run-lab.sh build # builds both sides (php:8.3-alpine + python3 service)
./run-lab.sh up # cve103035lab network: tp-vuln / tp-fixed
./run-lab.sh sweep
./run-lab.sh down
poc/poc.py (stdlib only):
e022b27 / three authorization guards.A standalone full-chain exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=tp-vuln
# exit 1 on confirmed cross-team folder conversion, 0 on a safe target
| mode | tp-vuln (e022b27^) | tp-fixed (e022b27) |
|---|---|---|
| attack (other team's folder → personal) | moved, no denial — subtree stolen | error_not_allowed_to — no move |
| admin move | moved | moved |
| shared-to-shared move | moved | moved |
Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt,
evidence/versions.txt, evidence/0day-sweep.txt.
cve103035lab
network; PHP 8.3 CLI in the lab images.All three authorization checks run before the simulated database update, and they cover the target folder, the destination parent and the domain change. Admin maintenance moves and ordinary shared-to-shared moves still succeed on the fixed build, confirming the guards are not over-broad. No residual re-parenting bypass was found on the fixed line in this sweep.
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)
exploit/exploit.py standalone full-chain exploit
lab/harness-*.php verbatim upstream guard blocks + minimal PHP stubs
lab/lab.Dockerfile builds both sides from the pinned upstream source slices
lab/service.py HTTP wrapper (POST /folder), child-process isolation
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)