CWE-22
Allowed-with-ReviewImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Abstraction: Base · Status: Stable
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
13322 vulnerabilities reference this CWE, most recent first.
GHSA-JV4F-V7GG-5MVH
Vulnerability from github – Published: 2025-03-04 21:30 – Updated: 2025-03-04 21:30A vulnerability regarding improper limitation of a pathname to a restricted directory ('Path Traversal') is found in the Language Settings functionality. This allows remote attackers to read specific files containing non-sensitive information via unspecified vectors. The following models with Synology Camera Firmware versions before 1.0.7-0298 may be affected: BC500 and TC500.
{
"affected": [],
"aliases": [
"CVE-2023-47803"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-06-28T06:15:04Z",
"severity": "MODERATE"
},
"details": "A vulnerability regarding improper limitation of a pathname to a restricted directory (\u0027Path Traversal\u0027) is found in the Language Settings functionality. This allows remote attackers to read specific files containing non-sensitive information via unspecified vectors. The following models with Synology Camera Firmware versions before 1.0.7-0298 may be affected: BC500 and TC500.",
"id": "GHSA-jv4f-v7gg-5mvh",
"modified": "2025-03-04T21:30:53Z",
"published": "2025-03-04T21:30:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-47803"
},
{
"type": "WEB",
"url": "https://www.synology.com/en-global/security/advisory/Synology_SA_23_15"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-JV5X-HVG3-3PJM
Vulnerability from github – Published: 2022-05-24 17:11 – Updated: 2024-04-04 02:49An issue was discovered in the File Upload plugin before 4.13.0 for WordPress. A directory traversal can lead to remote code execution by uploading a crafted txt file into the lib directory, because of a wfu_include_lib call.
{
"affected": [],
"aliases": [
"CVE-2020-10564"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-03-13T23:15:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in the File Upload plugin before 4.13.0 for WordPress. A directory traversal can lead to remote code execution by uploading a crafted txt file into the lib directory, because of a wfu_include_lib call.",
"id": "GHSA-jv5x-hvg3-3pjm",
"modified": "2024-04-04T02:49:22Z",
"published": "2022-05-24T17:11:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-10564"
},
{
"type": "WEB",
"url": "https://github.com/beerpwn/CVE/tree/master/WP-File-Upload_disclosure_report"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/wp-file-upload/#developers"
},
{
"type": "WEB",
"url": "https://wpvulndb.com/vulnerabilities/10132"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JV6R-27WW-4GW4
Vulnerability from github – Published: 2026-03-03 19:17 – Updated: 2026-03-25 18:42Summary
DM pairing-store identities were incorrectly eligible for group allowlist authorization checks, enabling cross-context authorization in group message paths.
Details
In affected versions, group allowlist evaluation could inherit identities from the DM pairing store. A sender approved via DM pairing could satisfy group sender allowlist checks without being explicitly present in groupAllowFrom.
This is an authorization-policy boundary issue between DM pairing and group allowlists.
Affected Packages / Versions
openclaw(npm): affected<= 2026.2.25(latest published npm version at triage time)openclaw(npm): patched>= 2026.2.26(planned next release)
Fix Commit(s)
openclaw/openclaw@8bdda7a651c21e98faccdbbd73081e79cffe8be0openclaw/openclaw@051fdcc428129446e7c084260f837b7284279ce9
Release Process Note
patched_versions is pre-set to the planned next release (2026.2.26) so once npm release is published, maintainers can publish the advisory without additional metadata edits.
Maintainer Timeline Note
Maintainers landed the initial fix before this report was filed; this report still provided useful independent confirmation of the issue class and exploit path.
OpenClaw thanks @tdjackey for reporting.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2026.2.25"
},
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.2.26"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32027"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-285",
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-03T19:17:22Z",
"nvd_published_at": "2026-03-19T22:16:37Z",
"severity": "HIGH"
},
"details": "## Summary\nDM pairing-store identities were incorrectly eligible for group allowlist authorization checks, enabling cross-context authorization in group message paths.\n\n## Details\nIn affected versions, group allowlist evaluation could inherit identities from the DM pairing store. A sender approved via DM pairing could satisfy group sender allowlist checks without being explicitly present in `groupAllowFrom`.\n\nThis is an authorization-policy boundary issue between DM pairing and group allowlists.\n\n## Affected Packages / Versions\n- `openclaw` (npm): affected `\u003c= 2026.2.25` (latest published npm version at triage time)\n- `openclaw` (npm): patched `\u003e= 2026.2.26` (planned next release)\n\n## Fix Commit(s)\n- `openclaw/openclaw@8bdda7a651c21e98faccdbbd73081e79cffe8be0`\n- `openclaw/openclaw@051fdcc428129446e7c084260f837b7284279ce9`\n\n## Release Process Note\n`patched_versions` is pre-set to the planned next release (`2026.2.26`) so once npm release is published, maintainers can publish the advisory without additional metadata edits.\n\n## Maintainer Timeline Note\nMaintainers landed the initial fix before this report was filed; this report still provided useful independent confirmation of the issue class and exploit path.\n\nOpenClaw thanks @tdjackey for reporting.",
"id": "GHSA-jv6r-27ww-4gw4",
"modified": "2026-03-25T18:42:22Z",
"published": "2026-03-03T19:17:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-jv6r-27ww-4gw4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32027"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/051fdcc428129446e7c084260f837b7284279ce9"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/8bdda7a651c21e98faccdbbd73081e79cffe8be0"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-improper-authorization-via-dm-pairing-store-identity-inheritance-in-group-allowlist"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw DM pairing-store identities could satisfy group allowlist authorization"
}
GHSA-JV6W-84RC-RMVF
Vulnerability from github – Published: 2022-05-17 00:26 – Updated: 2022-05-17 00:26Directory traversal vulnerability in the Visor GUI Console in GridGain before 1.7.16, 1.8.x before 1.8.12, 1.9.x before 1.9.7, and 8.x before 8.1.5 allows remote authenticated users to read arbitrary files on remote cluster nodes via a crafted path.
{
"affected": [],
"aliases": [
"CVE-2017-14614"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-10-10T01:30:00Z",
"severity": "MODERATE"
},
"details": "Directory traversal vulnerability in the Visor GUI Console in GridGain before 1.7.16, 1.8.x before 1.8.12, 1.9.x before 1.9.7, and 8.x before 8.1.5 allows remote authenticated users to read arbitrary files on remote cluster nodes via a crafted path.",
"id": "GHSA-jv6w-84rc-rmvf",
"modified": "2022-05-17T00:26:11Z",
"published": "2022-05-17T00:26:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-14614"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2017/10/05/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-JV74-C838-VCPF
Vulnerability from github – Published: 2024-08-13 09:30 – Updated: 2024-08-13 09:30A vulnerability has been identified in SINEC NMS (All versions < V3.0). The importCertificate function of the SINEC NMS Control web application contains a path traversal vulnerability. This could allow an authenticated attacker it to delete arbitrary certificate files on the drive SINEC NMS is installed on.
{
"affected": [],
"aliases": [
"CVE-2024-41938"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-13T08:15:14Z",
"severity": "MODERATE"
},
"details": "A vulnerability has been identified in SINEC NMS (All versions \u003c V3.0). The importCertificate function of the SINEC NMS Control web application contains a path traversal vulnerability. This could allow an authenticated attacker it to delete arbitrary certificate files on the drive SINEC NMS is installed on.",
"id": "GHSA-jv74-c838-vcpf",
"modified": "2024-08-13T09:30:52Z",
"published": "2024-08-13T09:30:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-41938"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/html/ssa-784301.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-JV74-F9PJ-XP3F
Vulnerability from github – Published: 2018-10-16 23:07 – Updated: 2022-11-17 19:14Apache Camel's Mail 2.20.0 through 2.20.3, 2.21.0 through 2.21.1 and 2.22.0 is vulnerable to path traversal.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-mail"
},
"ranges": [
{
"events": [
{
"introduced": "2.20.0"
},
{
"fixed": "2.20.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-mail"
},
"ranges": [
{
"events": [
{
"introduced": "2.21.0"
},
{
"fixed": "2.21.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.camel:camel-mail"
},
"ranges": [
{
"events": [
{
"introduced": "2.22.0"
},
{
"fixed": "2.22.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.22.0"
]
}
],
"aliases": [
"CVE-2018-8041"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:44:10Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "Apache Camel\u0027s Mail 2.20.0 through 2.20.3, 2.21.0 through 2.21.1 and 2.22.0 is vulnerable to path traversal.",
"id": "GHSA-jv74-f9pj-xp3f",
"modified": "2022-11-17T19:14:08Z",
"published": "2018-10-16T23:07:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-8041"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/4580e4d6c65cfd544c1791c824b5819477c583cc"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/4f401c09d22c45c94fa97746dc31905e06b19e3"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/63c7c080de4d18f9ceb25843508710df2c2c6d4"
},
{
"type": "WEB",
"url": "https://github.com/apache/camel/commit/a0d25d9582c6ee85e9567fa39413df0b4f02ef7"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:3768"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-jv74-f9pj-xp3f"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/camel"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/CAMEL-12630"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread.html/2318d7f7d87724d8716cd650c21b31cb06e4d34f6d0f5ee42f28fdaf@%3Ccommits.camel.apache.org%3E"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread.html/b4014ea7c5830ca1fc28edd5cafedfe93ad4af2d9e69c961c5def31d@%3Ccommits.camel.apache.org%3E"
},
{
"type": "WEB",
"url": "http://camel.apache.org/security-advisories.data/CVE-2018-8041.txt.asc?version=1\u0026modificationDate=1536746339000\u0026api=v2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/105352"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Apache Camel\u0027s Mail is vulnerable to path traversal"
}
GHSA-JV7G-9G6Q-CXVW
Vulnerability from github – Published: 2022-01-27 14:04 – Updated: 2022-01-27 13:51This affects all versions of package convert-svg-core; all versions of package convert-svg-to-png; all versions of package convert-svg-to-jpeg. Using a specially crafted SVG file, an attacker could read arbitrary files from the file system and then show the file content as a converted PNG file.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "convert-svg-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "convert-svg-to-png"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "convert-svg-to-jpeg"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.5.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23631"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2022-01-24T23:06:09Z",
"nvd_published_at": "2022-01-21T20:15:00Z",
"severity": "HIGH"
},
"details": "This affects all versions of package convert-svg-core; all versions of package convert-svg-to-png; all versions of package convert-svg-to-jpeg. Using a specially crafted SVG file, an attacker could read arbitrary files from the file system and then show the file content as a converted PNG file.",
"id": "GHSA-jv7g-9g6q-cxvw",
"modified": "2022-01-27T13:51:45Z",
"published": "2022-01-27T14:04:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23631"
},
{
"type": "WEB",
"url": "https://gist.github.com/legndery/a248350bb25b8502a03c2f407cedeb14"
},
{
"type": "PACKAGE",
"url": "https://github.com/neocotic/convert-svg"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-CONVERTSVGCORE-1582785"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOJPEG-2348245"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOPNG-2348244"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Path Traversal in convert-svg packages"
}
GHSA-JV9C-3Q58-CMGW
Vulnerability from github – Published: 2026-06-04 09:30 – Updated: 2026-06-04 21:31The system Binder boundary accepts unverified pass-through AT commands, giving local applications the power to read baseband files or disable cellular connectivity.
{
"affected": [],
"aliases": [
"CVE-2026-50207"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-04T09:16:29Z",
"severity": "HIGH"
},
"details": "The system Binder boundary accepts unverified pass-through AT commands, giving local applications the power to read baseband files or disable cellular connectivity.",
"id": "GHSA-jv9c-3q58-cmgw",
"modified": "2026-06-04T21:31:20Z",
"published": "2026-06-04T09:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-50207"
},
{
"type": "WEB",
"url": "https://community.acer.com/en/kb/articles/19707"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-JV9M-VF54-CHJJ
Vulnerability from github – Published: 2025-10-09 15:21 – Updated: 2025-11-15 03:13Summary
The WriteFileTool in Flowise does not restrict the file path for reading, allowing authenticated attackers to exploit this vulnerability to write arbitrary files to any path in the file system, potentially leading to remote command execution.
Details
Flowise supports providing WriteFileTool for large models, which is used to write files to the server's file system. The implementation of this tool is located at packages/components/nodes/tools/WriteFile/WriteFile.ts.
/**
* Class for writing data to files on the disk. Extends the StructuredTool
* class.
*/
export class WriteFileTool extends StructuredTool {
static lc_name() {
return 'WriteFileTool'
}
schema = z.object({
file_path: z.string().describe('name of file'),
text: z.string().describe('text to write to file')
}) as any
name = 'write_file'
description = 'Write file from disk'
store: BaseFileStore
constructor({ store, ...rest }: WriteFileParams) {
super(rest)
this.store = store
}
async _call({ file_path, text }: z.infer<typeof this.schema>) {
await this.store.writeFile(file_path, text)
return 'File written to successfully.'
}
}
This tool directly uses the file_path parameter passed to it without verifying whether the path belongs to Flowise's working directory. Authenticated attackers can exploit this vulnerability to write files with arbitrary content to any path on the server.
There are numerous ways to achieve remote command execution through arbitrary file write vulnerabilities, which will not be elaborated here. For example, attackers could write their own public key to ~/.ssh/authorized_keys to gain remote SSH access, or overwrite /etc/ld.so.preload to hijack dynamic libraries and execute arbitrary code. Flowise's historical vulnerability information (https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-8vvx-qvq9-5948) also describes steps to achieve remote command execution by overwriting the start command in package.json.
PoC
This file writing vulnerability has been verified to exist in the latest Flowise Docker image (https://hub.docker.com/layers/flowiseai/flowise/latest/images/sha256-26300377397818a451e0710389eb77615256b0f3ecc895194850ab35dda3ae7b). The reproduction steps are as follows:
- Pull the Flowise Docker image
docker pull flowiseai/flowise
- Start the Flowise service
docker run -d --name flowise -p 3000:3000 flowise
- Access the Flowise service at server ip:3000 in your browser and register an account
- Save the following content as agent.json
{
"nodes": [
{
"id": "startAgentflow_0",
"type": "agentFlow",
"position": {
"x": -203,
"y": 37
},
"data": {
"id": "startAgentflow_0",
"label": "Start",
"version": 1.1,
"name": "startAgentflow",
"type": "Start",
"color": "#7EE787",
"hideInput": true,
"baseClasses": [
"Start"
],
"category": "Agent Flows",
"description": "Starting point of the agentflow",
"inputParams": [
{
"label": "Input Type",
"name": "startInputType",
"type": "options",
"options": [
{
"label": "Chat Input",
"name": "chatInput",
"description": "Start the conversation with chat input"
},
{
"label": "Form Input",
"name": "formInput",
"description": "Start the workflow with form inputs"
}
],
"default": "chatInput",
"id": "startAgentflow_0-input-startInputType-options",
"display": true
},
{
"label": "Form Title",
"name": "formTitle",
"type": "string",
"placeholder": "Please Fill Out The Form",
"show": {
"startInputType": "formInput"
},
"id": "startAgentflow_0-input-formTitle-string",
"display": false
},
{
"label": "Form Description",
"name": "formDescription",
"type": "string",
"placeholder": "Complete all fields below to continue",
"show": {
"startInputType": "formInput"
},
"id": "startAgentflow_0-input-formDescription-string",
"display": false
},
{
"label": "Form Input Types",
"name": "formInputTypes",
"description": "Specify the type of form input",
"type": "array",
"show": {
"startInputType": "formInput"
},
"array": [
{
"label": "Type",
"name": "type",
"type": "options",
"options": [
{
"label": "String",
"name": "string"
},
{
"label": "Number",
"name": "number"
},
{
"label": "Boolean",
"name": "boolean"
},
{
"label": "Options",
"name": "options"
}
],
"default": "string"
},
{
"label": "Label",
"name": "label",
"type": "string",
"placeholder": "Label for the input"
},
{
"label": "Variable Name",
"name": "name",
"type": "string",
"placeholder": "Variable name for the input (must be camel case)",
"description": "Variable name must be camel case. For example: firstName, lastName, etc."
},
{
"label": "Add Options",
"name": "addOptions",
"type": "array",
"show": {
"formInputTypes[$index].type": "options"
},
"array": [
{
"label": "Option",
"name": "option",
"type": "string"
}
]
}
],
"id": "startAgentflow_0-input-formInputTypes-array",
"display": false
},
{
"label": "Ephemeral Memory",
"name": "startEphemeralMemory",
"type": "boolean",
"description": "Start fresh for every execution without past chat history",
"optional": true,
"id": "startAgentflow_0-input-startEphemeralMemory-boolean",
"display": true
},
{
"label": "Flow State",
"name": "startState",
"description": "Runtime state during the execution of the workflow",
"type": "array",
"optional": true,
"array": [
{
"label": "Key",
"name": "key",
"type": "string",
"placeholder": "Foo"
},
{
"label": "Value",
"name": "value",
"type": "string",
"placeholder": "Bar",
"optional": true
}
],
"id": "startAgentflow_0-input-startState-array",
"display": true
},
{
"label": "Persist State",
"name": "startPersistState",
"type": "boolean",
"description": "Persist the state in the same session",
"optional": true,
"id": "startAgentflow_0-input-startPersistState-boolean",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"startInputType": "chatInput",
"formTitle": "",
"formDescription": "",
"formInputTypes": "",
"startEphemeralMemory": "",
"startState": "",
"startPersistState": ""
},
"outputAnchors": [
{
"id": "startAgentflow_0-output-startAgentflow",
"label": "Start",
"name": "startAgentflow"
}
],
"outputs": {},
"selected": false
},
"width": 103,
"height": 66,
"selected": false,
"positionAbsolute": {
"x": -203,
"y": 37
},
"dragging": false
},
{
"id": "directReplyAgentflow_0",
"position": {
"x": 209,
"y": 30.25
},
"data": {
"id": "directReplyAgentflow_0",
"label": "Direct Reply 0",
"version": 1,
"name": "directReplyAgentflow",
"type": "DirectReply",
"color": "#4DDBBB",
"hideOutput": true,
"baseClasses": [
"DirectReply"
],
"category": "Agent Flows",
"description": "Directly reply to the user with a message",
"inputParams": [
{
"label": "Message",
"name": "directReplyMessage",
"type": "string",
"rows": 4,
"acceptVariable": true,
"id": "directReplyAgentflow_0-input-directReplyMessage-string",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"directReplyMessage": "",
"undefined": ""
},
"outputAnchors": [],
"outputs": {},
"selected": false
},
"type": "agentFlow",
"width": 163,
"height": 66,
"selected": false,
"positionAbsolute": {
"x": 209,
"y": 30.25
},
"dragging": false
},
{
"id": "agentAgentflow_0",
"position": {
"x": -63.5,
"y": 89.125
},
"data": {
"id": "agentAgentflow_0",
"label": "Agent 0",
"version": 2,
"name": "agentAgentflow",
"type": "Agent",
"color": "#4DD0E1",
"baseClasses": [
"Agent"
],
"category": "Agent Flows",
"description": "Dynamically choose and utilize tools during runtime, enabling multi-step reasoning",
"inputParams": [
{
"label": "Model",
"name": "agentModel",
"type": "asyncOptions",
"loadMethod": "listModels",
"loadConfig": true,
"id": "agentAgentflow_0-input-agentModel-asyncOptions",
"display": true
},
{
"label": "Messages",
"name": "agentMessages",
"type": "array",
"optional": true,
"acceptVariable": true,
"array": [
{
"label": "Role",
"name": "role",
"type": "options",
"options": [
{
"label": "System",
"name": "system"
},
{
"label": "Assistant",
"name": "assistant"
},
{
"label": "Developer",
"name": "developer"
},
{
"label": "User",
"name": "user"
}
]
},
{
"label": "Content",
"name": "content",
"type": "string",
"acceptVariable": true,
"generateInstruction": true,
"rows": 4
}
],
"id": "agentAgentflow_0-input-agentMessages-array",
"display": true
},
{
"label": "OpenAI Built-in Tools",
"name": "agentToolsBuiltInOpenAI",
"type": "multiOptions",
"optional": true,
"options": [
{
"label": "Web Search",
"name": "web_search_preview",
"description": "Search the web for the latest information"
},
{
"label": "Code Interpreter",
"name": "code_interpreter",
"description": "Write and run Python code in a sandboxed environment"
},
{
"label": "Image Generation",
"name": "image_generation",
"description": "Generate images based on a text prompt"
}
],
"show": {
"agentModel": "chatOpenAI"
},
"id": "agentAgentflow_0-input-agentToolsBuiltInOpenAI-multiOptions",
"display": false
},
{
"label": "Tools",
"name": "agentTools",
"type": "array",
"optional": true,
"array": [
{
"label": "Tool",
"name": "agentSelectedTool",
"type": "asyncOptions",
"loadMethod": "listTools",
"loadConfig": true
},
{
"label": "Require Human Input",
"name": "agentSelectedToolRequiresHumanInput",
"type": "boolean",
"optional": true
}
],
"id": "agentAgentflow_0-input-agentTools-array",
"display": true
},
{
"label": "Knowledge (Document Stores)",
"name": "agentKnowledgeDocumentStores",
"type": "array",
"description": "Give your agent context about different document sources. Document stores must be upserted in advance.",
"array": [
{
"label": "Document Store",
"name": "documentStore",
"type": "asyncOptions",
"loadMethod": "listStores"
},
{
"label": "Describe Knowledge",
"name": "docStoreDescription",
"type": "string",
"generateDocStoreDescription": true,
"placeholder": "Describe what the knowledge base is about, this is useful for the AI to know when and how to search for correct information",
"rows": 4
},
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true
}
],
"optional": true,
"id": "agentAgentflow_0-input-agentKnowledgeDocumentStores-array",
"display": true
},
{
"label": "Knowledge (Vector Embeddings)",
"name": "agentKnowledgeVSEmbeddings",
"type": "array",
"description": "Give your agent context about different document sources from existing vector stores and embeddings",
"array": [
{
"label": "Vector Store",
"name": "vectorStore",
"type": "asyncOptions",
"loadMethod": "listVectorStores",
"loadConfig": true
},
{
"label": "Embedding Model",
"name": "embeddingModel",
"type": "asyncOptions",
"loadMethod": "listEmbeddings",
"loadConfig": true
},
{
"label": "Knowledge Name",
"name": "knowledgeName",
"type": "string",
"placeholder": "A short name for the knowledge base, this is useful for the AI to know when and how to search for correct information"
},
{
"label": "Describe Knowledge",
"name": "knowledgeDescription",
"type": "string",
"placeholder": "Describe what the knowledge base is about, this is useful for the AI to know when and how to search for correct information",
"rows": 4
},
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true
}
],
"optional": true,
"id": "agentAgentflow_0-input-agentKnowledgeVSEmbeddings-array",
"display": true
},
{
"label": "Enable Memory",
"name": "agentEnableMemory",
"type": "boolean",
"description": "Enable memory for the conversation thread",
"default": true,
"optional": true,
"id": "agentAgentflow_0-input-agentEnableMemory-boolean",
"display": true
},
{
"label": "Memory Type",
"name": "agentMemoryType",
"type": "options",
"options": [
{
"label": "All Messages",
"name": "allMessages",
"description": "Retrieve all messages from the conversation"
},
{
"label": "Window Size",
"name": "windowSize",
"description": "Uses a fixed window size to surface the last N messages"
},
{
"label": "Conversation Summary",
"name": "conversationSummary",
"description": "Summarizes the whole conversation"
},
{
"label": "Conversation Summary Buffer",
"name": "conversationSummaryBuffer",
"description": "Summarize conversations once token limit is reached. Default to 2000"
}
],
"optional": true,
"default": "allMessages",
"show": {
"agentEnableMemory": true
},
"id": "agentAgentflow_0-input-agentMemoryType-options",
"display": false
},
{
"label": "Window Size",
"name": "agentMemoryWindowSize",
"type": "number",
"default": "20",
"description": "Uses a fixed window size to surface the last N messages",
"show": {
"agentMemoryType": "windowSize"
},
"id": "agentAgentflow_0-input-agentMemoryWindowSize-number",
"display": false
},
{
"label": "Max Token Limit",
"name": "agentMemoryMaxTokenLimit",
"type": "number",
"default": "2000",
"description": "Summarize conversations once token limit is reached. Default to 2000",
"show": {
"agentMemoryType": "conversationSummaryBuffer"
},
"id": "agentAgentflow_0-input-agentMemoryMaxTokenLimit-number",
"display": false
},
{
"label": "Input Message",
"name": "agentUserMessage",
"type": "string",
"description": "Add an input message as user message at the end of the conversation",
"rows": 4,
"optional": true,
"acceptVariable": true,
"show": {
"agentEnableMemory": true
},
"id": "agentAgentflow_0-input-agentUserMessage-string",
"display": false
},
{
"label": "Return Response As",
"name": "agentReturnResponseAs",
"type": "options",
"options": [
{
"label": "User Message",
"name": "userMessage"
},
{
"label": "Assistant Message",
"name": "assistantMessage"
}
],
"default": "userMessage",
"id": "agentAgentflow_0-input-agentReturnResponseAs-options",
"display": true
},
{
"label": "Update Flow State",
"name": "agentUpdateState",
"description": "Update runtime state during the execution of the workflow",
"type": "array",
"optional": true,
"acceptVariable": true,
"array": [
{
"label": "Key",
"name": "key",
"type": "asyncOptions",
"loadMethod": "listRuntimeStateKeys",
"freeSolo": true
},
{
"label": "Value",
"name": "value",
"type": "string",
"acceptVariable": true,
"acceptNodeOutputAsVariable": true
}
],
"id": "agentAgentflow_0-input-agentUpdateState-array",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"agentModel": "chatOpenRouter",
"agentMessages": [
{
"role": "",
"content": "<p><span class=\"variable\" data-type=\"mention\" data-id=\"question\" data-label=\"question\">{{ question }}</span> </p>"
}
],
"agentTools": [
{
"agentSelectedTool": "readFile",
"agentSelectedToolRequiresHumanInput": "",
"agentSelectedToolConfig": {
"basePath": "/",
"agentSelectedTool": "readFile"
}
},
{
"agentSelectedTool": "writeFile",
"agentSelectedToolRequiresHumanInput": "",
"agentSelectedToolConfig": {
"basePath": "/",
"agentSelectedTool": "writeFile"
}
}
],
"agentKnowledgeDocumentStores": "",
"agentKnowledgeVSEmbeddings": "",
"agentEnableMemory": false,
"agentReturnResponseAs": "userMessage",
"agentUpdateState": "",
"undefined": "",
"agentModelConfig": {
"cache": "",
"modelName": "qwen/qwen3-30b-a3b",
"temperature": 0.9,
"streaming": true,
"maxTokens": "",
"topP": "",
"frequencyPenalty": "",
"presencePenalty": "",
"timeout": "",
"basepath": "https://openrouter.ai/api/v1",
"baseOptions": "",
"agentModel": "chatOpenRouter"
}
},
"outputAnchors": [
{
"id": "agentAgentflow_0-output-agentAgentflow",
"label": "Agent",
"name": "agentAgentflow"
}
],
"outputs": {},
"selected": false
},
"type": "agentFlow",
"width": 232,
"height": 100,
"selected": false,
"positionAbsolute": {
"x": -63.5,
"y": 89.125
},
"dragging": false
}
],
"edges": [
{
"source": "startAgentflow_0",
"sourceHandle": "startAgentflow_0-output-startAgentflow",
"target": "agentAgentflow_0",
"targetHandle": "agentAgentflow_0",
"data": {
"sourceColor": "#7EE787",
"targetColor": "#4DD0E1",
"isHumanInput": false
},
"type": "agentFlow",
"id": "startAgentflow_0-startAgentflow_0-output-startAgentflow-agentAgentflow_0-agentAgentflow_0"
},
{
"source": "agentAgentflow_0",
"sourceHandle": "agentAgentflow_0-output-agentAgentflow",
"target": "directReplyAgentflow_0",
"targetHandle": "directReplyAgentflow_0",
"data": {
"sourceColor": "#4DD0E1",
"targetColor": "#4DDBBB",
"isHumanInput": false
},
"type": "agentFlow",
"id": "agentAgentflow_0-agentAgentflow_0-output-agentAgentflow-directReplyAgentflow_0-directReplyAgentflow_0"
}
]
}
- Click on "AgentFlows" on the left, then click "Add New" on the right to enter the Agent creation page. Click the gear button in the upper right corner, select "Load Agents," choose the agent.json file, and after successful import, you will see three connected nodes.
- Double-click the middle "Agent 0" node, click "ChatOpenRouter Parameters," then "Connect Credential," and select "Create New." Enter a valid OpenRouter API Key. Alternatively, click "Model" to choose another LLM provider. Once done, click the save button in the upper right corner.
- After saving, click the purple chat button in the upper right corner and enter: Write "hacked" to /tmp/hacked.txt.
- After the call is completed, log in to the container via
docker exec -it [container id] sh, and you can see that the file has been successfully written.
Impact
Authenticated attackers can exploit this vulnerability to write arbitrary files to any path on the server, ultimately achieving remote command execution.
Credit
This vulnerability was discovered by:
- XlabAI Team of Tencent Xuanwu Lab
- Atuin Automated Vulnerability Discovery Engine
CVE(s) and credit(s) are preferred.
If you have any questions regarding the vulnerability details, please feel free to reach out to us for further discussion. Our email address is xlabai@tencent.com.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "flowise"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "flowise-components"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.0.5"
},
"package": {
"ecosystem": "npm",
"name": "Flowise"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-61913"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2025-10-09T15:21:39Z",
"nvd_published_at": "2025-10-08T23:15:31Z",
"severity": "CRITICAL"
},
"details": "### Summary\n\nThe WriteFileTool in Flowise does not restrict the file path for reading, allowing authenticated attackers to exploit this vulnerability to write arbitrary files to any path in the file system, potentially leading to remote command execution.\n\n### Details\n\nFlowise supports providing WriteFileTool for large models, which is used to write files to the server\u0027s file system. The implementation of this tool is located at packages/components/nodes/tools/WriteFile/WriteFile.ts.\n\n```\n/**\n * Class for writing data to files on the disk. Extends the StructuredTool\n * class.\n */\nexport class WriteFileTool extends StructuredTool {\n static lc_name() {\n return \u0027WriteFileTool\u0027\n }\n\n schema = z.object({\n file_path: z.string().describe(\u0027name of file\u0027),\n text: z.string().describe(\u0027text to write to file\u0027)\n }) as any\n\n name = \u0027write_file\u0027\n\n description = \u0027Write file from disk\u0027\n\n store: BaseFileStore\n\n constructor({ store, ...rest }: WriteFileParams) {\n super(rest)\n\n this.store = store\n }\n\n async _call({ file_path, text }: z.infer\u003ctypeof this.schema\u003e) {\n await this.store.writeFile(file_path, text)\n return \u0027File written to successfully.\u0027\n }\n}\n\n```\n\nThis tool directly uses the file_path parameter passed to it without verifying whether the path belongs to Flowise\u0027s working directory. Authenticated attackers can exploit this vulnerability to write files with arbitrary content to any path on the server. \n\nThere are numerous ways to achieve remote command execution through arbitrary file write vulnerabilities, which will not be elaborated here. For example, attackers could write their own public key to ~/.ssh/authorized_keys to gain remote SSH access, or overwrite /etc/ld.so.preload to hijack dynamic libraries and execute arbitrary code. Flowise\u0027s historical vulnerability information (https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-8vvx-qvq9-5948) also describes steps to achieve remote command execution by overwriting the start command in package.json.\n\n### PoC\n\nThis file writing vulnerability has been verified to exist in the latest Flowise Docker image (https://hub.docker.com/layers/flowiseai/flowise/latest/images/sha256-26300377397818a451e0710389eb77615256b0f3ecc895194850ab35dda3ae7b). The reproduction steps are as follows:\n\n1. Pull the Flowise Docker image\n\n```\ndocker pull flowiseai/flowise\n```\n\n2. Start the Flowise service\n\n```\ndocker run -d --name flowise -p 3000:3000 flowise\n```\n\n3. Access the Flowise service at server ip:3000 in your browser and register an account\n4. Save the following content as agent.json\n\n```\n{\n \"nodes\": [\n {\n \"id\": \"startAgentflow_0\",\n \"type\": \"agentFlow\",\n \"position\": {\n \"x\": -203,\n \"y\": 37\n },\n \"data\": {\n \"id\": \"startAgentflow_0\",\n \"label\": \"Start\",\n \"version\": 1.1,\n \"name\": \"startAgentflow\",\n \"type\": \"Start\",\n \"color\": \"#7EE787\",\n \"hideInput\": true,\n \"baseClasses\": [\n \"Start\"\n ],\n \"category\": \"Agent Flows\",\n \"description\": \"Starting point of the agentflow\",\n \"inputParams\": [\n {\n \"label\": \"Input Type\",\n \"name\": \"startInputType\",\n \"type\": \"options\",\n \"options\": [\n {\n \"label\": \"Chat Input\",\n \"name\": \"chatInput\",\n \"description\": \"Start the conversation with chat input\"\n },\n {\n \"label\": \"Form Input\",\n \"name\": \"formInput\",\n \"description\": \"Start the workflow with form inputs\"\n }\n ],\n \"default\": \"chatInput\",\n \"id\": \"startAgentflow_0-input-startInputType-options\",\n \"display\": true\n },\n {\n \"label\": \"Form Title\",\n \"name\": \"formTitle\",\n \"type\": \"string\",\n \"placeholder\": \"Please Fill Out The Form\",\n \"show\": {\n \"startInputType\": \"formInput\"\n },\n \"id\": \"startAgentflow_0-input-formTitle-string\",\n \"display\": false\n },\n {\n \"label\": \"Form Description\",\n \"name\": \"formDescription\",\n \"type\": \"string\",\n \"placeholder\": \"Complete all fields below to continue\",\n \"show\": {\n \"startInputType\": \"formInput\"\n },\n \"id\": \"startAgentflow_0-input-formDescription-string\",\n \"display\": false\n },\n {\n \"label\": \"Form Input Types\",\n \"name\": \"formInputTypes\",\n \"description\": \"Specify the type of form input\",\n \"type\": \"array\",\n \"show\": {\n \"startInputType\": \"formInput\"\n },\n \"array\": [\n {\n \"label\": \"Type\",\n \"name\": \"type\",\n \"type\": \"options\",\n \"options\": [\n {\n \"label\": \"String\",\n \"name\": \"string\"\n },\n {\n \"label\": \"Number\",\n \"name\": \"number\"\n },\n {\n \"label\": \"Boolean\",\n \"name\": \"boolean\"\n },\n {\n \"label\": \"Options\",\n \"name\": \"options\"\n }\n ],\n \"default\": \"string\"\n },\n {\n \"label\": \"Label\",\n \"name\": \"label\",\n \"type\": \"string\",\n \"placeholder\": \"Label for the input\"\n },\n {\n \"label\": \"Variable Name\",\n \"name\": \"name\",\n \"type\": \"string\",\n \"placeholder\": \"Variable name for the input (must be camel case)\",\n \"description\": \"Variable name must be camel case. For example: firstName, lastName, etc.\"\n },\n {\n \"label\": \"Add Options\",\n \"name\": \"addOptions\",\n \"type\": \"array\",\n \"show\": {\n \"formInputTypes[$index].type\": \"options\"\n },\n \"array\": [\n {\n \"label\": \"Option\",\n \"name\": \"option\",\n \"type\": \"string\"\n }\n ]\n }\n ],\n \"id\": \"startAgentflow_0-input-formInputTypes-array\",\n \"display\": false\n },\n {\n \"label\": \"Ephemeral Memory\",\n \"name\": \"startEphemeralMemory\",\n \"type\": \"boolean\",\n \"description\": \"Start fresh for every execution without past chat history\",\n \"optional\": true,\n \"id\": \"startAgentflow_0-input-startEphemeralMemory-boolean\",\n \"display\": true\n },\n {\n \"label\": \"Flow State\",\n \"name\": \"startState\",\n \"description\": \"Runtime state during the execution of the workflow\",\n \"type\": \"array\",\n \"optional\": true,\n \"array\": [\n {\n \"label\": \"Key\",\n \"name\": \"key\",\n \"type\": \"string\",\n \"placeholder\": \"Foo\"\n },\n {\n \"label\": \"Value\",\n \"name\": \"value\",\n \"type\": \"string\",\n \"placeholder\": \"Bar\",\n \"optional\": true\n }\n ],\n \"id\": \"startAgentflow_0-input-startState-array\",\n \"display\": true\n },\n {\n \"label\": \"Persist State\",\n \"name\": \"startPersistState\",\n \"type\": \"boolean\",\n \"description\": \"Persist the state in the same session\",\n \"optional\": true,\n \"id\": \"startAgentflow_0-input-startPersistState-boolean\",\n \"display\": true\n }\n ],\n \"inputAnchors\": [],\n \"inputs\": {\n \"startInputType\": \"chatInput\",\n \"formTitle\": \"\",\n \"formDescription\": \"\",\n \"formInputTypes\": \"\",\n \"startEphemeralMemory\": \"\",\n \"startState\": \"\",\n \"startPersistState\": \"\"\n },\n \"outputAnchors\": [\n {\n \"id\": \"startAgentflow_0-output-startAgentflow\",\n \"label\": \"Start\",\n \"name\": \"startAgentflow\"\n }\n ],\n \"outputs\": {},\n \"selected\": false\n },\n \"width\": 103,\n \"height\": 66,\n \"selected\": false,\n \"positionAbsolute\": {\n \"x\": -203,\n \"y\": 37\n },\n \"dragging\": false\n },\n {\n \"id\": \"directReplyAgentflow_0\",\n \"position\": {\n \"x\": 209,\n \"y\": 30.25\n },\n \"data\": {\n \"id\": \"directReplyAgentflow_0\",\n \"label\": \"Direct Reply 0\",\n \"version\": 1,\n \"name\": \"directReplyAgentflow\",\n \"type\": \"DirectReply\",\n \"color\": \"#4DDBBB\",\n \"hideOutput\": true,\n \"baseClasses\": [\n \"DirectReply\"\n ],\n \"category\": \"Agent Flows\",\n \"description\": \"Directly reply to the user with a message\",\n \"inputParams\": [\n {\n \"label\": \"Message\",\n \"name\": \"directReplyMessage\",\n \"type\": \"string\",\n \"rows\": 4,\n \"acceptVariable\": true,\n \"id\": \"directReplyAgentflow_0-input-directReplyMessage-string\",\n \"display\": true\n }\n ],\n \"inputAnchors\": [],\n \"inputs\": {\n \"directReplyMessage\": \"\",\n \"undefined\": \"\"\n },\n \"outputAnchors\": [],\n \"outputs\": {},\n \"selected\": false\n },\n \"type\": \"agentFlow\",\n \"width\": 163,\n \"height\": 66,\n \"selected\": false,\n \"positionAbsolute\": {\n \"x\": 209,\n \"y\": 30.25\n },\n \"dragging\": false\n },\n {\n \"id\": \"agentAgentflow_0\",\n \"position\": {\n \"x\": -63.5,\n \"y\": 89.125\n },\n \"data\": {\n \"id\": \"agentAgentflow_0\",\n \"label\": \"Agent 0\",\n \"version\": 2,\n \"name\": \"agentAgentflow\",\n \"type\": \"Agent\",\n \"color\": \"#4DD0E1\",\n \"baseClasses\": [\n \"Agent\"\n ],\n \"category\": \"Agent Flows\",\n \"description\": \"Dynamically choose and utilize tools during runtime, enabling multi-step reasoning\",\n \"inputParams\": [\n {\n \"label\": \"Model\",\n \"name\": \"agentModel\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listModels\",\n \"loadConfig\": true,\n \"id\": \"agentAgentflow_0-input-agentModel-asyncOptions\",\n \"display\": true\n },\n {\n \"label\": \"Messages\",\n \"name\": \"agentMessages\",\n \"type\": \"array\",\n \"optional\": true,\n \"acceptVariable\": true,\n \"array\": [\n {\n \"label\": \"Role\",\n \"name\": \"role\",\n \"type\": \"options\",\n \"options\": [\n {\n \"label\": \"System\",\n \"name\": \"system\"\n },\n {\n \"label\": \"Assistant\",\n \"name\": \"assistant\"\n },\n {\n \"label\": \"Developer\",\n \"name\": \"developer\"\n },\n {\n \"label\": \"User\",\n \"name\": \"user\"\n }\n ]\n },\n {\n \"label\": \"Content\",\n \"name\": \"content\",\n \"type\": \"string\",\n \"acceptVariable\": true,\n \"generateInstruction\": true,\n \"rows\": 4\n }\n ],\n \"id\": \"agentAgentflow_0-input-agentMessages-array\",\n \"display\": true\n },\n {\n \"label\": \"OpenAI Built-in Tools\",\n \"name\": \"agentToolsBuiltInOpenAI\",\n \"type\": \"multiOptions\",\n \"optional\": true,\n \"options\": [\n {\n \"label\": \"Web Search\",\n \"name\": \"web_search_preview\",\n \"description\": \"Search the web for the latest information\"\n },\n {\n \"label\": \"Code Interpreter\",\n \"name\": \"code_interpreter\",\n \"description\": \"Write and run Python code in a sandboxed environment\"\n },\n {\n \"label\": \"Image Generation\",\n \"name\": \"image_generation\",\n \"description\": \"Generate images based on a text prompt\"\n }\n ],\n \"show\": {\n \"agentModel\": \"chatOpenAI\"\n },\n \"id\": \"agentAgentflow_0-input-agentToolsBuiltInOpenAI-multiOptions\",\n \"display\": false\n },\n {\n \"label\": \"Tools\",\n \"name\": \"agentTools\",\n \"type\": \"array\",\n \"optional\": true,\n \"array\": [\n {\n \"label\": \"Tool\",\n \"name\": \"agentSelectedTool\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listTools\",\n \"loadConfig\": true\n },\n {\n \"label\": \"Require Human Input\",\n \"name\": \"agentSelectedToolRequiresHumanInput\",\n \"type\": \"boolean\",\n \"optional\": true\n }\n ],\n \"id\": \"agentAgentflow_0-input-agentTools-array\",\n \"display\": true\n },\n {\n \"label\": \"Knowledge (Document Stores)\",\n \"name\": \"agentKnowledgeDocumentStores\",\n \"type\": \"array\",\n \"description\": \"Give your agent context about different document sources. Document stores must be upserted in advance.\",\n \"array\": [\n {\n \"label\": \"Document Store\",\n \"name\": \"documentStore\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listStores\"\n },\n {\n \"label\": \"Describe Knowledge\",\n \"name\": \"docStoreDescription\",\n \"type\": \"string\",\n \"generateDocStoreDescription\": true,\n \"placeholder\": \"Describe what the knowledge base is about, this is useful for the AI to know when and how to search for correct information\",\n \"rows\": 4\n },\n {\n \"label\": \"Return Source Documents\",\n \"name\": \"returnSourceDocuments\",\n \"type\": \"boolean\",\n \"optional\": true\n }\n ],\n \"optional\": true,\n \"id\": \"agentAgentflow_0-input-agentKnowledgeDocumentStores-array\",\n \"display\": true\n },\n {\n \"label\": \"Knowledge (Vector Embeddings)\",\n \"name\": \"agentKnowledgeVSEmbeddings\",\n \"type\": \"array\",\n \"description\": \"Give your agent context about different document sources from existing vector stores and embeddings\",\n \"array\": [\n {\n \"label\": \"Vector Store\",\n \"name\": \"vectorStore\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listVectorStores\",\n \"loadConfig\": true\n },\n {\n \"label\": \"Embedding Model\",\n \"name\": \"embeddingModel\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listEmbeddings\",\n \"loadConfig\": true\n },\n {\n \"label\": \"Knowledge Name\",\n \"name\": \"knowledgeName\",\n \"type\": \"string\",\n \"placeholder\": \"A short name for the knowledge base, this is useful for the AI to know when and how to search for correct information\"\n },\n {\n \"label\": \"Describe Knowledge\",\n \"name\": \"knowledgeDescription\",\n \"type\": \"string\",\n \"placeholder\": \"Describe what the knowledge base is about, this is useful for the AI to know when and how to search for correct information\",\n \"rows\": 4\n },\n {\n \"label\": \"Return Source Documents\",\n \"name\": \"returnSourceDocuments\",\n \"type\": \"boolean\",\n \"optional\": true\n }\n ],\n \"optional\": true,\n \"id\": \"agentAgentflow_0-input-agentKnowledgeVSEmbeddings-array\",\n \"display\": true\n },\n {\n \"label\": \"Enable Memory\",\n \"name\": \"agentEnableMemory\",\n \"type\": \"boolean\",\n \"description\": \"Enable memory for the conversation thread\",\n \"default\": true,\n \"optional\": true,\n \"id\": \"agentAgentflow_0-input-agentEnableMemory-boolean\",\n \"display\": true\n },\n {\n \"label\": \"Memory Type\",\n \"name\": \"agentMemoryType\",\n \"type\": \"options\",\n \"options\": [\n {\n \"label\": \"All Messages\",\n \"name\": \"allMessages\",\n \"description\": \"Retrieve all messages from the conversation\"\n },\n {\n \"label\": \"Window Size\",\n \"name\": \"windowSize\",\n \"description\": \"Uses a fixed window size to surface the last N messages\"\n },\n {\n \"label\": \"Conversation Summary\",\n \"name\": \"conversationSummary\",\n \"description\": \"Summarizes the whole conversation\"\n },\n {\n \"label\": \"Conversation Summary Buffer\",\n \"name\": \"conversationSummaryBuffer\",\n \"description\": \"Summarize conversations once token limit is reached. Default to 2000\"\n }\n ],\n \"optional\": true,\n \"default\": \"allMessages\",\n \"show\": {\n \"agentEnableMemory\": true\n },\n \"id\": \"agentAgentflow_0-input-agentMemoryType-options\",\n \"display\": false\n },\n {\n \"label\": \"Window Size\",\n \"name\": \"agentMemoryWindowSize\",\n \"type\": \"number\",\n \"default\": \"20\",\n \"description\": \"Uses a fixed window size to surface the last N messages\",\n \"show\": {\n \"agentMemoryType\": \"windowSize\"\n },\n \"id\": \"agentAgentflow_0-input-agentMemoryWindowSize-number\",\n \"display\": false\n },\n {\n \"label\": \"Max Token Limit\",\n \"name\": \"agentMemoryMaxTokenLimit\",\n \"type\": \"number\",\n \"default\": \"2000\",\n \"description\": \"Summarize conversations once token limit is reached. Default to 2000\",\n \"show\": {\n \"agentMemoryType\": \"conversationSummaryBuffer\"\n },\n \"id\": \"agentAgentflow_0-input-agentMemoryMaxTokenLimit-number\",\n \"display\": false\n },\n {\n \"label\": \"Input Message\",\n \"name\": \"agentUserMessage\",\n \"type\": \"string\",\n \"description\": \"Add an input message as user message at the end of the conversation\",\n \"rows\": 4,\n \"optional\": true,\n \"acceptVariable\": true,\n \"show\": {\n \"agentEnableMemory\": true\n },\n \"id\": \"agentAgentflow_0-input-agentUserMessage-string\",\n \"display\": false\n },\n {\n \"label\": \"Return Response As\",\n \"name\": \"agentReturnResponseAs\",\n \"type\": \"options\",\n \"options\": [\n {\n \"label\": \"User Message\",\n \"name\": \"userMessage\"\n },\n {\n \"label\": \"Assistant Message\",\n \"name\": \"assistantMessage\"\n }\n ],\n \"default\": \"userMessage\",\n \"id\": \"agentAgentflow_0-input-agentReturnResponseAs-options\",\n \"display\": true\n },\n {\n \"label\": \"Update Flow State\",\n \"name\": \"agentUpdateState\",\n \"description\": \"Update runtime state during the execution of the workflow\",\n \"type\": \"array\",\n \"optional\": true,\n \"acceptVariable\": true,\n \"array\": [\n {\n \"label\": \"Key\",\n \"name\": \"key\",\n \"type\": \"asyncOptions\",\n \"loadMethod\": \"listRuntimeStateKeys\",\n \"freeSolo\": true\n },\n {\n \"label\": \"Value\",\n \"name\": \"value\",\n \"type\": \"string\",\n \"acceptVariable\": true,\n \"acceptNodeOutputAsVariable\": true\n }\n ],\n \"id\": \"agentAgentflow_0-input-agentUpdateState-array\",\n \"display\": true\n }\n ],\n \"inputAnchors\": [],\n \"inputs\": {\n \"agentModel\": \"chatOpenRouter\",\n \"agentMessages\": [\n {\n \"role\": \"\",\n \"content\": \"\u003cp\u003e\u003cspan class=\\\"variable\\\" data-type=\\\"mention\\\" data-id=\\\"question\\\" data-label=\\\"question\\\"\u003e{{ question }}\u003c/span\u003e \u003c/p\u003e\"\n }\n ],\n \"agentTools\": [\n {\n \"agentSelectedTool\": \"readFile\",\n \"agentSelectedToolRequiresHumanInput\": \"\",\n \"agentSelectedToolConfig\": {\n \"basePath\": \"/\",\n \"agentSelectedTool\": \"readFile\"\n }\n },\n {\n \"agentSelectedTool\": \"writeFile\",\n \"agentSelectedToolRequiresHumanInput\": \"\",\n \"agentSelectedToolConfig\": {\n \"basePath\": \"/\",\n \"agentSelectedTool\": \"writeFile\"\n }\n }\n ],\n \"agentKnowledgeDocumentStores\": \"\",\n \"agentKnowledgeVSEmbeddings\": \"\",\n \"agentEnableMemory\": false,\n \"agentReturnResponseAs\": \"userMessage\",\n \"agentUpdateState\": \"\",\n \"undefined\": \"\",\n \"agentModelConfig\": {\n \"cache\": \"\",\n \"modelName\": \"qwen/qwen3-30b-a3b\",\n \"temperature\": 0.9,\n \"streaming\": true,\n \"maxTokens\": \"\",\n \"topP\": \"\",\n \"frequencyPenalty\": \"\",\n \"presencePenalty\": \"\",\n \"timeout\": \"\",\n \"basepath\": \"https://openrouter.ai/api/v1\",\n \"baseOptions\": \"\",\n \"agentModel\": \"chatOpenRouter\"\n }\n },\n \"outputAnchors\": [\n {\n \"id\": \"agentAgentflow_0-output-agentAgentflow\",\n \"label\": \"Agent\",\n \"name\": \"agentAgentflow\"\n }\n ],\n \"outputs\": {},\n \"selected\": false\n },\n \"type\": \"agentFlow\",\n \"width\": 232,\n \"height\": 100,\n \"selected\": false,\n \"positionAbsolute\": {\n \"x\": -63.5,\n \"y\": 89.125\n },\n \"dragging\": false\n }\n ],\n \"edges\": [\n {\n \"source\": \"startAgentflow_0\",\n \"sourceHandle\": \"startAgentflow_0-output-startAgentflow\",\n \"target\": \"agentAgentflow_0\",\n \"targetHandle\": \"agentAgentflow_0\",\n \"data\": {\n \"sourceColor\": \"#7EE787\",\n \"targetColor\": \"#4DD0E1\",\n \"isHumanInput\": false\n },\n \"type\": \"agentFlow\",\n \"id\": \"startAgentflow_0-startAgentflow_0-output-startAgentflow-agentAgentflow_0-agentAgentflow_0\"\n },\n {\n \"source\": \"agentAgentflow_0\",\n \"sourceHandle\": \"agentAgentflow_0-output-agentAgentflow\",\n \"target\": \"directReplyAgentflow_0\",\n \"targetHandle\": \"directReplyAgentflow_0\",\n \"data\": {\n \"sourceColor\": \"#4DD0E1\",\n \"targetColor\": \"#4DDBBB\",\n \"isHumanInput\": false\n },\n \"type\": \"agentFlow\",\n \"id\": \"agentAgentflow_0-agentAgentflow_0-output-agentAgentflow-directReplyAgentflow_0-directReplyAgentflow_0\"\n }\n ]\n}\n```\n5. Click on \"AgentFlows\" on the left, then click \"Add New\" on the right to enter the Agent creation page. Click the gear button in the upper right corner, select \"Load Agents,\" choose the agent.json file, and after successful import, you will see three connected nodes.\n6. Double-click the middle \"Agent 0\" node, click \"ChatOpenRouter Parameters,\" then \"Connect Credential,\" and select \"Create New.\" Enter a valid OpenRouter API Key. Alternatively, click \"Model\" to choose another LLM provider. Once done, click the save button in the upper right corner.\n7. After saving, click the purple chat button in the upper right corner and enter: Write \"hacked\" to /tmp/hacked.txt. \n8. After the call is completed, log in to the container via `docker exec -it [container id] sh`, and you can see that the file has been successfully written.\n\n### Impact\n\nAuthenticated attackers can exploit this vulnerability to write arbitrary files to any path on the server, ultimately achieving remote command execution.\n\n### Credit\n\nThis vulnerability was discovered by:\n\n- XlabAI Team of Tencent Xuanwu Lab\n- Atuin Automated Vulnerability Discovery Engine\n\nCVE(s) and credit(s) are preferred.\n\nIf you have any questions regarding the vulnerability details, please feel free to reach out to us for further discussion. Our email address is xlabai@tencent.com.",
"id": "GHSA-jv9m-vf54-chjj",
"modified": "2025-11-15T03:13:52Z",
"published": "2025-10-09T15:21:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-j44m-5v8f-gc9c"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-jv9m-vf54-chjj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-61913"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/pull/5275"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/commit/1fb12cd93143592a18995f63b781d25b354d48a3"
},
{
"type": "PACKAGE",
"url": "https://github.com/FlowiseAI/Flowise"
},
{
"type": "WEB",
"url": "https://github.com/FlowiseAI/Flowise/releases/tag/flowise%403.0.8"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Flowise is vulnerable to arbitrary file write through its WriteFileTool "
}
GHSA-JVCM-F35G-W78P
Vulnerability from github – Published: 2026-06-19 21:42 – Updated: 2026-06-19 21:42Summary
AgentRuntime promises scoped file access under a configured sandbox basePath, but its path containment checks use raw string prefix tests. A sandbox base such as /tmp/network-ai-sandbox also matches a sibling path such as /tmp/network-ai-sandbox_evil/secret.txt.
An agent/user that can call AgentRuntime.readFile() or AgentRuntime.listDir() can read or list files outside the intended sandbox when the target path is in a sibling directory sharing the base path prefix. This breaks the documented sandbox boundary. Confirmed in Network-AI 5.12.1. Severity: Medium, CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
Details
The vulnerable containment check is in lib/agent-runtime.ts:
resolvePath(filePath: string): string | null {
const normalized = normalize(filePath);
const absolute = isAbsolute(normalized)
? normalized
: join(this.config.basePath, normalized);
const resolved = resolve(absolute);
// Traversal check
if (!resolved.startsWith(this.config.basePath)) return null;
return resolved;
}
startsWith() is not path-boundary-aware. If this.config.basePath is /tmp/network-ai-sandbox, then /tmp/network-ai-sandbox_evil/secret.txt also starts with /tmp/network-ai-sandbox despite being outside the sandbox.
The same pattern appears in SandboxPolicy.isPathAllowed() for allowed and blocked paths. FileAccessor.read(), FileAccessor.write(), and FileAccessor.list() rely on these checks before I/O, and AgentRuntime.readFile() exposes this behavior. Reads auto-approve by default when autoApproveReads is enabled.
Affected source evidence:
lib/agent-runtime.ts:393-423—isPathAllowed()/resolvePath()use stringstartsWith()containment.lib/agent-runtime.ts:669-691— file read sink relies on those checks.lib/agent-runtime.ts:933-958—AgentRuntime.readFile()exposes file reads.
PoC
Run from the repository root after installing dependencies:
node -r ts-node/register/transpile-only - <<'TS'
const { mkdtempSync, mkdirSync, writeFileSync, rmSync } = require('fs');
const { tmpdir } = require('os');
const { join } = require('path');
const { AgentRuntime } = require('./lib/agent-runtime');
(async () => {
const parent = mkdtempSync(join(tmpdir(), 'network-ai-poc-'));
const base = join(parent, 'sandbox');
const sibling = join(parent, 'sandbox_evil');
mkdirSync(base);
mkdirSync(sibling);
writeFileSync(join(sibling, 'secret.txt'), 'SECRET_OUTSIDE_SANDBOX', 'utf8');
const runtime = new AgentRuntime({
policy: { basePath: base, allowedPaths: ['.'], allowedCommands: [] },
});
const absoluteRead = await runtime.readFile(join(sibling, 'secret.txt'), 'poc-agent');
const relativeRead = await runtime.readFile('../sandbox_evil/secret.txt', 'poc-agent');
console.log(JSON.stringify({
base,
outside: join(sibling, 'secret.txt'),
absoluteRead: { success: absoluteRead.success, content: absoluteRead.content },
relativeRead: { success: relativeRead.success, content: relativeRead.content },
}, null, 2));
rmSync(parent, { recursive: true, force: true });
})();
TS
Observed result: both reads succeed and return SECRET_OUTSIDE_SANDBOX, even though the file is outside basePath.
Impact
An agent/user with access to AgentRuntime file operations can bypass the intended sandbox root and read or list files outside the sandbox when those files are located in sibling paths sharing the sandbox base path prefix. This is a sandbox boundary bypass and path traversal vulnerability. Default confirmed impact is read/list disclosure. If an embedding application uses FileAccessor.write() directly or auto-approves runtime writes, the same root cause may allow writes outside the intended sandbox to prefix-collision sibling paths. No RCE chain was confirmed.
Resolution (maintainer)
Fixed in v5.12.2 (commit a59c13a). Install: npm install network-ai@5.12.2 — published to npm with provenance.
SandboxPolicy.resolvePath() and isPathAllowed() now use separator-anchored prefix checks (resolved === base || resolved.startsWith(base + path.sep)) for both the allow-list and block-list. A sibling directory that merely shares a name prefix (e.g. /srv/app-evil vs base /srv/app) is no longer treated as in-scope.
All 3,269 tests pass against the patched build. Thanks to @sondt99 for the responsible disclosure.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.12.1"
},
"package": {
"ecosystem": "npm",
"name": "network-ai"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.12.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-23"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-19T21:42:29Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n`AgentRuntime` promises scoped file access under a configured sandbox `basePath`, but its path containment checks use raw string prefix tests. A sandbox base such as `/tmp/network-ai-sandbox` also matches a sibling path such as `/tmp/network-ai-sandbox_evil/secret.txt`.\n\nAn agent/user that can call `AgentRuntime.readFile()` or `AgentRuntime.listDir()` can read or list files outside the intended sandbox when the target path is in a sibling directory sharing the base path prefix. This breaks the documented sandbox boundary. Confirmed in Network-AI 5.12.1. Severity: Medium, CVSS 3.1 vector `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`.\n\n### Details\nThe vulnerable containment check is in `lib/agent-runtime.ts`:\n\n```ts\nresolvePath(filePath: string): string | null {\n const normalized = normalize(filePath);\n const absolute = isAbsolute(normalized)\n ? normalized\n : join(this.config.basePath, normalized);\n const resolved = resolve(absolute);\n\n // Traversal check\n if (!resolved.startsWith(this.config.basePath)) return null;\n return resolved;\n}\n```\n\n`startsWith()` is not path-boundary-aware. If `this.config.basePath` is `/tmp/network-ai-sandbox`, then `/tmp/network-ai-sandbox_evil/secret.txt` also starts with `/tmp/network-ai-sandbox` despite being outside the sandbox.\n\nThe same pattern appears in `SandboxPolicy.isPathAllowed()` for allowed and blocked paths. `FileAccessor.read()`, `FileAccessor.write()`, and `FileAccessor.list()` rely on these checks before I/O, and `AgentRuntime.readFile()` exposes this behavior. Reads auto-approve by default when `autoApproveReads` is enabled.\n\nAffected source evidence:\n\n- `lib/agent-runtime.ts:393-423` \u2014 `isPathAllowed()` / `resolvePath()` use string `startsWith()` containment.\n- `lib/agent-runtime.ts:669-691` \u2014 file read sink relies on those checks.\n- `lib/agent-runtime.ts:933-958` \u2014 `AgentRuntime.readFile()` exposes file reads.\n\n### PoC\nRun from the repository root after installing dependencies:\n\n```bash\nnode -r ts-node/register/transpile-only - \u003c\u003c\u0027TS\u0027\nconst { mkdtempSync, mkdirSync, writeFileSync, rmSync } = require(\u0027fs\u0027);\nconst { tmpdir } = require(\u0027os\u0027);\nconst { join } = require(\u0027path\u0027);\nconst { AgentRuntime } = require(\u0027./lib/agent-runtime\u0027);\n\n(async () =\u003e {\n const parent = mkdtempSync(join(tmpdir(), \u0027network-ai-poc-\u0027));\n const base = join(parent, \u0027sandbox\u0027);\n const sibling = join(parent, \u0027sandbox_evil\u0027);\n mkdirSync(base);\n mkdirSync(sibling);\n writeFileSync(join(sibling, \u0027secret.txt\u0027), \u0027SECRET_OUTSIDE_SANDBOX\u0027, \u0027utf8\u0027);\n\n const runtime = new AgentRuntime({\n policy: { basePath: base, allowedPaths: [\u0027.\u0027], allowedCommands: [] },\n });\n\n const absoluteRead = await runtime.readFile(join(sibling, \u0027secret.txt\u0027), \u0027poc-agent\u0027);\n const relativeRead = await runtime.readFile(\u0027../sandbox_evil/secret.txt\u0027, \u0027poc-agent\u0027);\n console.log(JSON.stringify({\n base,\n outside: join(sibling, \u0027secret.txt\u0027),\n absoluteRead: { success: absoluteRead.success, content: absoluteRead.content },\n relativeRead: { success: relativeRead.success, content: relativeRead.content },\n }, null, 2));\n rmSync(parent, { recursive: true, force: true });\n})();\nTS\n```\n\nObserved result: both reads succeed and return `SECRET_OUTSIDE_SANDBOX`, even though the file is outside `basePath`.\n\n### Impact\nAn agent/user with access to `AgentRuntime` file operations can bypass the intended sandbox root and read or list files outside the sandbox when those files are located in sibling paths sharing the sandbox base path prefix. This is a sandbox boundary bypass and path traversal vulnerability. Default confirmed impact is read/list disclosure. If an embedding application uses `FileAccessor.write()` directly or auto-approves runtime writes, the same root cause may allow writes outside the intended sandbox to prefix-collision sibling paths. No RCE chain was confirmed.\n\n\n---\n\n### Resolution (maintainer)\n\n**Fixed in [v5.12.2](https://github.com/Jovancoding/Network-AI/releases/tag/v5.12.2) (commit `a59c13a`).** Install: `npm install network-ai@5.12.2` \u2014 published to npm with provenance.\n\n`SandboxPolicy.resolvePath()` and `isPathAllowed()` now use separator-anchored prefix checks (`resolved === base || resolved.startsWith(base + path.sep)`) for both the allow-list and block-list. A sibling directory that merely shares a name prefix (e.g. `/srv/app-evil` vs base `/srv/app`) is no longer treated as in-scope.\n\nAll 3,269 tests pass against the patched build. Thanks to @sondt99 for the responsible disclosure.",
"id": "GHSA-jvcm-f35g-w78p",
"modified": "2026-06-19T21:42:29Z",
"published": "2026-06-19T21:42:29Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Jovancoding/Network-AI/security/advisories/GHSA-jvcm-f35g-w78p"
},
{
"type": "WEB",
"url": "https://github.com/Jovancoding/Network-AI/commit/a59c13a1f0ce0e8a0779a90343eef92fac5ab4c3"
},
{
"type": "PACKAGE",
"url": "https://github.com/Jovancoding/Network-AI"
},
{
"type": "WEB",
"url": "https://github.com/Jovancoding/Network-AI/releases/tag/v5.12.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Network-AI: AgentRuntime sandbox path-prefix checks allow file access outside the configured base directory"
}
Mitigation MIT-5.1
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
- Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-20.1
Strategy: Input Validation
- Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
- Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
- realpath() in C
- getCanonicalPath() in Java
- GetFullPath() in ASP.NET
- realpath() or abs_path() in Perl
- realpath() in PHP
Mitigation MIT-4
Strategy: Libraries or Frameworks
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-21.1
Strategy: Enforcement by Conversion
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Strategy: Attack Surface Reduction
- Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
- This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-126: Path Traversal
An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.
CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic
This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
CAPEC-78: Using Escaped Slashes in Alternate Encoding
This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.
CAPEC-79: Using Slashes in Alternate Encoding
This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.