Advisory

GHSA-6vh2-wg4h-4vwj

Details, part 2 of 2. The advisory

Details

Suggested Fix

Replace the ungated spread operations with explicit property picking:

File: `packages/server/src/utils/buildChatflow.ts`, lines 557–564:

// BEFORE (vulnerable):
const flowConfig: IFlowConfig = {
    chatflowid,
    chatflowId: chatflow.id,
    chatId,
    sessionId,
    chatHistory,
    apiMessageId,
    ...incomingInput.overrideConfig  // Ungated spread
}

// AFTER (fixed):
const flowConfig: IFlowConfig = {
    chatflowid,
    chatflowId: chatflow.id,
    chatId,
    sessionId,
    chatHistory,
    apiMessageId
    // Do NOT spread overrideConfig here. Node parameter overrides are
    // handled separately by replaceInputsWithConfig() which is gated
    // behind apiOverrideStatus.
}

File: `packages/server/src/utils/index.ts`, lines 569–574:

Apply the same fix — remove the ...overrideConfig spread from the flowData object literal.

If the intent is to allow certain overrideConfig properties to flow into flowConfig (e.g., for legitimate API integrations), implement an explicit allowlist:

const ALLOWED_FLOW_CONFIG_OVERRIDES = ['customProperty1', 'customProperty2'] // if any
const safeOverrides = pick(incomingInput.overrideConfig, ALLOWED_FLOW_CONFIG_OVERRIDES)
const flowConfig: IFlowConfig = {
    chatflowid,
    chatflowId: chatflow.id,
    chatId,       // Should NEVER be overrideable
    sessionId,    // Should NEVER be overrideable
    chatHistory,  // Should NEVER be overrideable
    apiMessageId, // Should NEVER be overrideable
    ...safeOverrides
}

Sources & licences