Security Digest · Critical advisory (no CVE assigned)

GHSA-h42x-xx2q-6v6g: Flowise Pre-auth Arbitrary File Upload

Summary An unauthorized attacker can leverage the whitelisted route /api/v1/attachments to upload arbitrary files when the storageType is set to local (default).

CVSS 9.3 Critical GitHub-reviewed · critical

Should you act?

  • Only if you depend on one of the packages below, directly or transitively, in a vulnerable version. Check your lockfile with npm audit (or: npm ls <package>).
  • No CVE has been assigned, so it will not appear in CVE-based scanners that ignore GitHub advisories. npm audit, pip-audit and Dependabot do read GitHub advisories.

Affected packages

EcosystemPackageVulnerableFirst fixed
npmflowise<= 2.2.7none listed

Details

Summary An unauthorized attacker can leverage the whitelisted route /api/v1/attachments to upload arbitrary files when the storageType is set to local (default).

Details When a new request arrives, the system first checks if the URL starts with /api/v1/. If it does, the system then verifies whether the URL is included in the whitelist (whitelistURLs). If the URL is whitelisted, the request proceeds; otherwise, the system enforces authentication.

@ /packages/server/src/index.ts

The whitelist is defined as follows

This means that every route in the whitelist does not require authentication. Now, let's examine the /api/v1/attachments route.

@ /packages/server/src/routes/attachments/index.ts

After several calls, the request reaches the createFileAttachment function @ (packages/server/src/utils/createAttachment.ts) Initially, the function retrieves chatflowid and chatId from the request without any additional validation. The only check performed is whether these parameters exist in the request.

Next, the function retrieves the uploaded files and attempts to add them to the storage by calling the addArrayFilesToStorage function.

CVSS: 9.3 (v4.0) CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Sources and references

  1. GitHub Advisory GHSA-h42x-xx2q-6v6g github.com
  2. github.com github.com
  3. github.com github.com

Critical npm advisories · Today’s Security Digest