Wysoka

FlowiseAI: CustomTemplate create+update mass-assignment allows cross-workspace template takeover

  • Ujawniono: 14.05.2026
  • Aktualizacja: 11.10.2026 10:22

Summary

Type: Mass assignment via Object.assign(entity, body) -> client-controlled workspaceId (and on create, id) overwritten on the CustomTemplate entity -> cross-workspace data takeover and IDOR. File: packages/server/src/services/marketplaces/index.ts Root cause: The CustomTemplate controller/service constructs a new CustomTemplate() and copies the request body into it via Object.assign(...) without an explicit field allowlist. The request body therefore can include workspaceId, id, createdDate, updatedDate. The server only rebinds some of these after the assign (e.g. on create, it overwrites workspaceId but not id; on update, it overwrites id but not workspaceId). The remaining client-controlled values land directly on the persisted row, breaking workspace isolation. Same root pattern as the customtemplate entity's sibling controllers and as DocumentStore before it was patched in commit 840d2ae.

Affected Code

File: packages/server/src/services/marketplaces/index.ts

ts
// at line 211
Object.assign(newTemplate, body)        // <-- BUG: body.id, body.workspaceId accepted

Why it's wrong: Object.assign(target, source) copies every own enumerable property of source onto target. The TypeORM/SQL persistence layer below it does not strip ownership-bearing columns, so workspaceId set in the request body lands as the new workspaceId of the persisted row. The DocumentStore patch (commit 840d2ae) demonstrated the intended fix shape (explicit field-by-field allowlist) but it has not been applied to this entity.

Exploit Chain

  1. Attacker is an authenticated member of workspace A. They have a session cookie / JWT for the Flowise web UI. State at this point: attacker can read and write entities scoped to workspace A.
  2. Attacker creates a customtemplate in workspace A via the documented API (or reuses an existing one they own). They note its entity id.
  3. Attacker issues a PUT /api/v1/customtemplates/<id> (or equivalent endpoint) with a JSON body that includes "workspaceId": "<workspace-B-id>" (an arbitrary other workspace's UUID). State at this point: the request reaches the controller as a workspace-A authenticated request.
  4. The controller calls Object.assign(updateEntity, body). The body's workspaceId overwrites the entity's workspaceId field. The persistence layer commits the row.
  5. Final state: the customtemplate row is now owned by workspace B. Workspace B members can see it, modify it, and use it. Workspace A loses access (it no longer satisfies their workspace filter). The original creator's workspace audit shows nothing because the operation looked like a normal update.

Security Impact

Severity: High. Cross-workspace boundary violation by any authenticated workspace member. Attacker capability: Any authenticated user with permission to update a customtemplate can move it to any workspace whose UUID they can guess or enumerate (workspace UUIDs are exposed in many API responses, so enumeration is trivial). CustomTemplates encode reusable workflow templates scoped to a workspace. Cross-workspace movement via workspaceId overwrite makes the template appear in another workspace's marketplace listing. Preconditions: Authenticated session with edit permission for the source customtemplate. No second factor required. Workspace UUIDs are exposed via the /api/v1/workspaces listing or via any cross-referenced object's workspaceId field, so target enumeration is trivial. Differential: PoC-verified by source inspection of the original GHSA-q4pr-4r26-c69r. Patched build (with the suggested fix below) refuses the workspaceId field; vulnerable build accepts it and persists it.

Suggested Fix

Already fixed in PR https://github.com/FlowiseAI/Flowise/pull/6129 (allowlist pattern applied).

ts
// Allowlist pattern (matches commit 840d2ae for DocumentStore):
const updatedCustomTemplate = new CustomTemplate()
if (body.<allowed_field_1> !== undefined) updatedCustomTemplate.<allowed_field_1> = body.<allowed_field_1>
if (body.<allowed_field_2> !== undefined) updatedCustomTemplate.<allowed_field_2> = body.<allowed_field_2>
// ...whitelist only the documented fields. Never copy id, workspaceId, createdDate, updatedDate from the client.

Regression tests should assert that a request body containing workspaceId, id, createdDate, or updatedDate is rejected (or at minimum: does not change those columns on the persisted row) for both create and update paths.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm flowise < 3.1.2 3.1.2

Odnośniki

Ocena CVSS -
Wektor CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Słabość (CWE)
CWE-915
Platforma
npm
Paczka
flowise
Ujawniono
14.05.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-728h-4mwj-f2p4 - CC BY 4.0

Historia podatności: flowise

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (114) w archiwum
Wszystkich wpisów
114
Pierwsza → ostatnia
04.2024 10.2026
Bez poprawki
16
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 28
  • Wysoka 62
  • Średnia 24

Ujawnienia w latach

  1. 2024: 11
  2. 2025: 22
  3. 2026: 81
Istotność:
  1. Wysoka CVE-2026-70474 < 3.1.3 3.1.3
  2. Krytyczna CVE-2026-69259 < 3.1.3 3.1.3
  3. Krytyczna CVE-2026-69256 < 3.1.3 3.1.3
  4. Krytyczna CVE-2026-69253 < 3.1.3 3.1.3
  5. Krytyczna CVE-2026-69251 < 3.1.3 3.1.3
  6. FlowiseAI: CustomTemplate create+update mass-assignment allows cross-workspace template takeover ten wpis
    Wysoka CVE-2026-46476 < 3.1.2 3.1.2
  7. Wysoka · 8.8 CVE-2026-46444 < 3.1.2 3.1.2
  8. Wysoka CVE-2026-46443 < 3.1.2 3.1.2
  9. Wysoka CVE-2026-56274 < 3.1.2 3.1.2
  10. Wysoka · 7.5 CVE-2026-46440 < 3.1.2 3.1.2
  11. Krytyczna · 9.8 CVE-2026-41264 < 3.1.0 3.1.0
  12. Wysoka · 9.8 CVE-2026-41276 < 3.1.0 3.1.0
  13. Wysoka CVE-2026-41274 < 3.1.0 3.1.0
  14. Wysoka · 7.5 CVE-2026-41275 < 3.1.0 3.1.0
  15. Wysoka · 7.1 CVE-2026-41271 < 3.1.0 3.1.0
  16. Wysoka · 7.1 CVE-2026-41272 < 3.1.0 3.1.0
  17. Wysoka · 7.1 CVE-2026-41269 < 3.1.0 3.1.0
  18. Wysoka · 7.7 CVE-2026-41268 < 3.1.0 3.1.0
  19. Wysoka · 7.5 CVE-2026-41266 < 3.1.0 3.1.0
  20. Krytyczna · 8.8 CVE-2026-41137 < 3.1.0 3.1.0
  21. Krytyczna · 9.9 CVE-2026-40933 < 3.1.0 3.1.0
Pokaż więcej (20) Widać 60 z 90

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.