llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · flowise

GHSA-X7X8-95GH-42XM

Flowise MCP Server Config cwd Parameter Validation Bypass

Parche disponible
Descargar PNG JSON
CVSS 4.0
9.0
Crítica
CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -33 d de la divulgación
Exposición80 dDesde la divulgación, 31 ago 2026, 9:01 a. m.
Detección79 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 3.1.4
Monitoreo
Detectada +1
29 jul 26
31 ago 26
18 nov 26
20 nov 26
29 jul 26
26 ago 26
24 sept 26
22 oct 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.1.4 flowise · -33 d desde divulgación
Divulgación Publicada GHSA-X7X8-95GH-42XM divulgada · CVSS 9 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
A validation bypass in Flowise's MCP server configuration allows authenticated attackers to achieve arbitrary code execution by exploiting an unvalidated `cwd` parameter that bypasses existing security controls.

### Root Cause
The `validateMCPServerConfig()` function in `packages/components/nodes/tools/MCP/core.ts` validates the `command`, `args`, and `env` parameters but completely ignores the `cwd` parameter. This parameter is later passed directly to `StdioClientTransport`, allowing attackers to bypass path validation by using clean filenames in `args` while controlling the working directory via `cwd`.

### Attack Vector
1. Attacker uses clean filename in `args` array: `["script.js"]` (passes validation)
2. Attacker sets `cwd` to point to directory with malicious files: `"/upload/path"` (unvalidated)
3. Validation succeeds because filename contains no path traversal
4. Process spawns from attacker-controlled directory, executing malicious code

### Impact
- Authenticated remote code execution
- Bypass of existing security controls
- Affects all current Flowise installations

## Affected Versions
- All current versions of Flowise (tested on latest Docker image)
- Specifically affects MCP server configuration functionality

## Vulnerable Code Location
File: `packages/components/nodes/tools/MCP/core.ts`
Function: `validateMCPServerConfig()` (lines 364-392)

export const validateMCPServerConfig = (serverParams: any): void => {
    // Validates command, args, env but NOT cwd
    // ...
    // BUG: serverParams.cwd is never validated but gets passed to StdioClientTransport
}

Proof of Concept

// Vulnerable configuration that passes validation:
const maliciousConfig = {
    command: 'node',
    args: ['script.js'],        // Clean filename - passes validation
    cwd: '/tmp/uploaded-files', // Unvalidated - contains malicious script.js
    env: {}
};
// This bypasses all existing security checks

## Suggested Fix
Add cwd validation to `validateMCPServerConfig()`:

// Add after existing validations:
if (serverParams.cwd) {
    if (typeof serverParams.cwd !== 'string') {
        throw new Error('cwd parameter must be a string');
    }
    
    if (path.isAbsolute(serverParams.cwd)) {
        throw new Error('cwd parameter cannot be an absolute path');
    }
    
    if (serverParams.cwd.includes('..')) {
        throw new Error('cwd parameter cannot contain path traversal');
    }
    
    const safeCwdPattern = /^[a-zA-Z0-9_-]+$/;
    if (!safeCwdPattern.test(serverParams.cwd)) {
        throw new Error('cwd parameter contains invalid characters');
    }
}

Another option is to block it completely.

## Relationship to Existing CVEs
This appears to be separate from CVE-2026-40933, which addressed command flag validation. This vulnerability involves a different parameter (`cwd` vs `args`) and requires a separate fix.

## CWE Classification
- CWE-20: Improper Input Validation
- CWE-78: OS Command Injection

## Reporter Information
Name: Diego Meyer

## Request CVE Assignment
☑️ Yes, please request a CVE ID for this vulnerability

## Coordinated Disclosure
☑️ This is being reported privately first to allow for coordinated disclosure

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:H
AltoBajoNinguno
Confid. (posterior)SC:H
AltoBajoNinguno
Integridad (posterior)SI:H
AltoBajoNinguno
Disponib. (posterior)SA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flowise · flowise-components≤ 3.1.3
3.1.3
3.1.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmflowise
Corregida 3.1.4 -33 d 3.1.4 no afectada
npmflowise-components
Corregida 3.1.4 -33 d 3.1.4 no afectada
Versiones corregidas3.1.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/FlowiseAI/Flowise/security/advisories/GHSA-x7x8-95gh-42xm

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.