FlowiseAI/Flowise · warning · Error

Potentially dangerous argument: ${arg}

Error message

Potentially dangerous argument: ${arg}

What it means

In `parseArgument`, after handling arrays/numbers/strings/etc., any remaining token is treated as a raw string but first checked against a blacklist: if it contains 'require', 'process', 'eval', or 'Function', it throws 'Potentially dangerous argument:'. This is a coarse injection guard meant to block Node-centric code execution attempts inside filter arguments.

Source

Thrown at packages/components/nodes/vectorstores/Supabase/filterParser.ts:178

        }

        // Handle booleans
        if (arg === 'true') return true
        if (arg === 'false') return false
        if (arg === 'null') return null

        // Handle arrays (basic support)
        if (arg.startsWith('[') && arg.endsWith(']')) {
            const arrayContent = arg.slice(1, -1).trim()
            if (!arrayContent) return []

            // Simple array parsing - just split by comma and parse each element
            return arrayContent.split(',').map((item) => this.parseArgument(item.trim()))
        }

        // For everything else, treat as string (but validate it doesn't contain dangerous characters)
        if (arg.includes('require') || arg.includes('process') || arg.includes('eval') || arg.includes('Function')) {
            throw new Error(`Potentially dangerous argument: ${arg}`)
        }

        return arg
    }

    private static buildFilterFunction(chain: Array<{ method: string; args: any[] }>): (rpc: any) => any {
        return (rpc: any) => {
            let result = rpc

            for (const { method, args } of chain) {
                if (typeof result[method] !== 'function') {
                    throw new Error(`Method ${method} is not available on the RPC object`)
                }

                try {
                    result = result[method](...args)
                } catch (error) {
                    throw new Error(`Failed to call ${method}: ${error.message}`)

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Remove the offending substring from the argument or pass it as a properly quoted string literal if the parser supports it.
  2. If the value is legitimately benign (e.g. a sentence), sanitize/encode it before submission.
  3. Do not rely on this blacklist as your only defense — it is bypassable; treat it as defense-in-depth.
  4. For user metadata containing these words, filter on a different field or pre-hash the value.

Example fix

// before: filter("note","eq",'the process failed') -> Potentially dangerous argument
// after: filter("note","eq",'the procedure failed')  // or store sanitized metadata
Defensive patterns

Strategy: validation

Validate before calling

const DANGEROUS = ['require','process','eval','Function']
function sanitizeArg(arg: string): string {
  if (DANGEROUS.some(d => arg.includes(d))) throw new Error(`Argument contains a blocked token: ${arg}`)
  return arg
}

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: A filter argument containing any of the substrings require/process/eval/Function — either a genuine injection attempt (e.g. `eval("...")`, `process.exit`) or a false positive where a legitimate value contains one of these words (e.g. a sentence containing 'process', a field named 'Function').

Common situations: Malicious/curiosity input trying to escape the DSL; benign metadata text that happens to include the word 'process' or 'require'; LLM-generated filter embedding one of the banned words.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/60cd09028881190a. Report an issue: GitHub.