Flowise on current main allows an authenticated user with
documentStores:preview-process permission to trigger the S3 Directory
document loader with attacker-controlled S3 object keys. The loader joins
each returned S3 key with a temporary directory using path.join(tempDir, key)
and writes the object bytes to disk without validating traversal sequences
such as ../. Cleanup later removes only the original temporary directory,
so files written outside that directory persist on the host filesystem.
This yields arbitrary file write with the privileges of the Flowise
server process.
A related variant exists in the S3File loader when
fileProcessingMethod = unstructured (same root cause; its cleanup behavior
turns it into a mixed arbitrary write/delete/DoS primitive).
packages/components/nodes/documentloaders/S3Directory/S3Directory.ts
filePath = path.join(tempDir, key) (unsanitized)mkdirSync creates parent pathwriteFileSync writes attacker-controlled bytestempDir, so escapedpackages/components/nodes/documentloaders/S3File/S3File.tspackages/server/src/routes/documentstore/index.ts:41,45/api/v1/document-store/loader/preview,/api/v1/document-store/loader/process/:loaderId)documentStores:preview-processpackages/server/src/services/documentstore/index.ts:588 passesdata.loaderConfig straight to the loader node with no pathS3Directory accepts a custom serverUrl, so the attacker does not
need access to an existing trusted AWS bucket — they can point Flowise.bashrc, systemd units, cron files, require.resolve targets,package.json postinstall scripts). This is not guaranteeddocumentStores:preview-process roleserverUrl can point todocumentStores:preview-process../../../../tmp/flowise-poc.txtLocal reproduction confirmed: writing a key containing
../../escape-target/poc.txt from a nested temp root created the file
outside the temp directory, and the cleanup removed only tempDir.
The loader trusts S3 object keys as safe local relative paths. It should
canonicalize the destination with path.resolve(...), verify the resolved
path remains within the intended temp directory, and reject traversal or
absolute-path patterns before any directory creation or file write.
The repository already has shared path validators that are not used here:
packages/components/src/validator.ts:35 defines traversal checkspackages/components/src/validator.ts:295 defines sanitizeFileNameRecommended fix:
path.join(tempDir, key) with a resolve-and-verify flowtempDirS3File loader (fileProcessingMethod = unstructured branch)| Software | Affected versions |
|---|---|
flowise-components
|
< 3.1.3 |
flowise
|
< 3.1.3 |
A security vulnerability is a weakness in software, hardware, or configuration that can be exploited to compromise confidentiality, integrity, or availability. Many vulnerabilities are tracked as CVEs (Common Vulnerabilities and Exposures), which provide a standardized identifier so teams can coordinate patching, mitigation, and risk assessment across tools and vendors.
CVSS (Common Vulnerability Scoring System) estimates technical severity, but it doesn't automatically equal business risk. Prioritize using context like internet exposure, affected asset criticality, known exploitation (proof-of-concept or in-the-wild), and whether compensating controls exist. A "Medium" CVSS on an exposed, production system can be more urgent than a "Critical" on an isolated, non-production host.
A vulnerability is the underlying weakness. An exploit is the method or code used to take advantage of it. A zero-day is a vulnerability that is unknown to the vendor or has no publicly available fix when attackers begin using it. In practice, risk increases sharply when exploitation becomes reliable or widespread.
Recurring findings usually come from incomplete Asset Discovery, inconsistent patch management, inherited images, and configuration drift. In modern environments, you also need to watch the software supply chain: dependencies, containers, build pipelines, and third-party services can reintroduce the same weakness even after you patch a single host. Unknown or unmanaged assets (often called Shadow IT) are a common reason the same issues resurface.
Use a simple, repeatable triage model: focus first on externally exposed assets, high-value systems (identity, VPN, email, production), vulnerabilities with known exploits, and issues that enable remote code execution or privilege escalation. Then enforce patch SLAs and track progress using consistent metrics so remediation is steady, not reactive.
SynScan combines attack surface monitoring and continuous security auditing to keep your inventory current, flag high-impact vulnerabilities early, and help you turn raw findings into a practical remediation plan.