Files
pangolin/server/routers
Marc Schäfer 51629247a5 fix(middleware): prevent cross-org site binding in target create/update
Extend verifySiteAccess to check that when req.userOrgId is already set
by a prior middleware (e.g. verifyResourceAccess/verifyTargetAccess), the
site from req.body.siteId belongs to the same organization. This prevents
the cross-organization tunnel boundary bypass where an attacker with
resource access in one org binds that resource's target to a site in
another org.

Add verifySiteAccess to both target route stacks:
- PUT /resource/:resourceId/target (after verifyResourceAccess)
- POST /target/:targetId (after verifyTargetAccess)

The org-match check runs before req.userOrg is overwritten, so the
resource's organization context is preserved for comparison.

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
2026-05-29 22:44:16 +00:00
..
2026-05-29 10:57:16 -07:00
2026-02-11 10:06:56 -08:00
2026-05-28 13:59:14 -07:00
2026-05-14 16:59:15 -07:00
2026-05-05 12:37:52 -07:00
2026-05-28 13:59:34 -07:00
2026-05-14 12:25:05 -07:00
2026-05-21 15:43:31 -07:00
2026-04-16 20:58:18 -07:00
2026-05-04 14:54:20 -07:00
2026-05-28 20:19:19 -07:00
2026-01-18 12:19:07 -08:00
2026-05-03 00:00:11 -04:00