Skip to content
OpenAdvisories

Weakness (CWE)

CWE-94: Improper Control of Generation of Code

Base 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.

How to prevent it (7 mitigations)
  1. Architecture and Design

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

  2. 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.

  3. Implementation

    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().

  4. 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.

  5. Operation

    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).

  6. Operation

    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).

  7. 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].

Source: MITRE CWE-94

574 results · Clear filters · Feed

  • Critical 9.8
    CVE-2026-30741 Public exploit

    A remote code execution (RCE) vulnerability in OpenClaw Agent Platform v2026.2.6 allows attackers to execute arbitrary …

  • High 8.3
    CVE-2026-29075 Public exploit

    Mesa: Checking out of untrusted code in `benchmarks.yml` workflow may lead to code execution in privileged runner

    Mesa is an open-source Python library for agent-based modeling, simulating complex systems and exploring emergent behaviors. In version 3.5.0 and prior, checking out of untrusted code in benchmarks.yml workflow may lead to code execution in privileged runner.…

  • High 8.5
    CVE-2026-28134 Public exploit

    WordPress JetEngine plugin <= 3.7.2 - Remote Code Execution (RCE) vulnerability

    Improper Control of Generation of Code ('Code Injection') vulnerability in Crocoblock JetEngine jet-engine allows Remote Code Inclusion.This issue affects JetEngine: from n/a through <= 3.7.2.

  • High 8.8
    CVE-2025-70995 Public exploit

    An issue in Aranda Service Desk Web Edition (ASDK API 8.6) allows authenticated attackers to achieve remote code execut…

  • High 7.5
    CVE-2026-28695 Public exploit

    Craft affected by authenticated RCE via Twig SSTI - create() function + Symfony Process gadget

    Craft is a content management system (CMS). There is an authenticated admin RCE in Craft CMS 5.8.21 via Server-Side Template Injection using the create() Twig function combined with a Symfony Process gadget chain. The create() Twig function exposes Craft::cre…

  • High 7.8
    CVE-2025-70341 Public exploit

    Insecure permissions in App-Auto-Patch v3.4.2 create a race condition which allows attackers to write arbitrary files.

  • Critical 9.8
    CVE-2025-59059 Public exploit

    Apache Ranger: Remote Code Execution Vulnerability in NashornScriptEngineCreator

    Remote Code Execution Vulnerability in NashornScriptEngineCreator is reported in Apache Ranger versions <= 2.7.0. Users are recommended to upgrade to version 2.8.0, which fixes this issue.

  • Critical 9.8
    CVE-2026-26720 Public exploit

    An issue in Twenty CRM v1.15.0 and before allows a remote attacker to execute arbitrary code via the local.driver.ts mo…

  • High 7.3
    CVE-2026-3395 Public exploit

    MaxSite CMS MarkItUp Preview AJAX Endpoint preview-ajax.php eval code injection

    A flaw has been found in MaxSite CMS up to 109.1. This impacts the function eval of the file application/maxsite/admin/plugins/editor_markitup/preview-ajax.php of the component MarkItUp Preview AJAX Endpoint. Executing a manipulation can lead to code injectio…

  • Critical 9.8
    CVE-2026-27966 Public exploit EPSS 35%

    Langflow has Remote Code Execution in CSV Agent

    Langflow is a tool for building and deploying AI-powered agents and workflows. Prior to version 1.8.0, the CSV Agent node in Langflow hardcodes `allow_dangerous_code=True`, which automatically exposes LangChain’s Python REPL tool (`python_repl_ast`). As a res…

  • Critical 9.4
    CVE-2026-27577 Public exploit EPSS 11%

    n8n: Expression Sandbox Escape Leads to RCE

    n8n is an open source workflow automation platform. Prior to versions 2.10.1, 2.9.3, and 1.123.22, additional exploits in the expression evaluation of n8n have been identified and patched following CVE-2025-68613. An authenticated user with permission to crea…

  • Critical 9.4
    CVE-2026-27495 Public exploit

    n8n has a Sandbox Escape in its JavaScript Task Runner

    n8n is an open source workflow automation platform. Prior to versions 2.10.1, 2.9.3, and 1.123.22, an authenticated user with permission to create or modify workflows could exploit a vulnerability in the JavaScript Task Runner sandbox to execute arbitrary cod…

  • High 8.8
    CVE-2026-27701 Public exploit

    LiveCodes vulnerable to JavaScript Injection via untrusted PR title in i18n-update-pull workflow

    LiveCode is an open-source, client-side code playground. Prior to commit e151c64c2bd80d2d53ac1333f1df9429fe6a1a11, LiveCode's `i18n-update-pull` GitHub Actions workflow is vulnerable to JavaScript injection. The title of the Pull Request associated with the t…

  • Low 3.5
    CVE-2026-3171 Public exploit

    SourceCodester/Patrick Mvuma Patients Waiting Area Queue Management System queue.php cross site scripting

    A flaw has been found in SourceCodester/Patrick Mvuma Patients Waiting Area Queue Management System 1.0. Affected by this vulnerability is an unknown functionality of the file /queue.php. This manipulation of the argument firstname/lastname causes cross site …

  • Critical 10.0
    CVE-2026-27597 Public exploit

    @enclave-vm/core is vulnerable to Sandbox Escape

    Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to version 2.11.1, it is possible to escape the security boundraries set by `@enclave-vm/core`, which can be used to achieve remote code execution (RCE). The issue has bee…

  • Medium 5.0
    CVE-2026-2964 Public exploit

    higuma web-audio-recorder-js Dynamic Config Handling WebAudioRecorder.js extend prototype pollution

    A vulnerability was identified in higuma web-audio-recorder-js 0.1/0.1.1. Impacted is the function extend in the library lib/WebAudioRecorder.js of the component Dynamic Config Handling. Such manipulation leads to improperly controlled modification of object …

  • Critical 10.0
    CVE-2026-27574 Public exploit

    OneUptime: node:vm sandbox escape in probe allows any project member to achieve RCE

    OneUptime is a solution for monitoring and managing online services. In versions 9.5.13 and below, custom JavaScript monitor feature uses Node.js's node:vm module (explicitly documented as not a security mechanism) to execute user-supplied code, allowing triv…

  • Critical 10.0
    CVE-2026-26030 Public exploit

    Microsoft Semantic Kernel InMemoryVectorStore filter functionality vulnerable to remote code execution

    Semantic Kernel, Microsoft's semantic kernel Python SDK, has a remote code execution vulnerability in versions prior to 1.39.4, specifically within the `InMemoryVectorStore` filter functionality. The problem has been fixed in version `python-1.39.4`. Users sh…

  • Critical 9.8
    CVE-2025-71243 Public exploit

    SPIP Saisies Plugin < 5.11.1 Remote Code Execution

    The 'Saisies pour formulaire' (Saisies) plugin for SPIP versions 5.4.0 through 5.11.0 contains a critical Remote Code Execution (RCE) vulnerability. An attacker can exploit this vulnerability to execute arbitrary code on the server. Users should immediately u…

  • High 8.1
    CVE-2026-25755 Public exploit

    jsPDF has PDF Object Injection via Unsanitized Input in addJS Method

    jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string deli…

  • Critical 9.1
    CVE-2026-25548 Public exploit

    InvoicePlane Vulnerable to Remote Code Execution via Local File Inclusion and Log Poisoning

    InvoicePlane is a self-hosted open source application for managing invoices, clients, and payments. A critical Remote Code Execution (RCE) vulnerability exists in InvoicePlane 1.7.0 through a chained Local File Inclusion (LFI) and Log Poisoning attack. An aut…

  • Critical 9.8
    CVE-2026-27174 Public exploit

    MajorDoMo Unauthenticated Remote Code Execution via Admin Console Eval

    MajorDoMo (aka Major Domestic Module) allows unauthenticated remote code execution via the admin panel's PHP console feature. An include order bug in modules/panel.class.php causes execution to continue past a redirect() call that lacks an exit statement, all…

  • Critical 9.9
    CVE-2025-70830 Public exploit

    A Server-Side Template Injection (SSTI) vulnerability in the Freemarker template engine of Datart v1.0.0-rc.3 allows au…

  • Critical 10.0
    CVE-2026-26216 Public exploit

    Crawl4AI < 0.8.0 Docker API Unauthenticated Remote Code Execution via Hooks Parameter

    Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the Docker API deployment. The /crawl endpoint accepts a hooks parameter containing Python code that is executed using exec(). The __import__ builtin was included in the allowed…

  • High 8.8
    CVE-2026-1560 Public exploit EPSS 10%

    Custom Block Builder – Lazy Blocks <= 4.2.0 - Authenticated (Contributor+) Remote Code Execution

    The Custom Block Builder – Lazy Blocks plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.2.0 via multiple functions in the 'LazyBlocks_Blocks' class. This makes it possible for authenticated attackers, with Co…

  • Low 2.4
    CVE-2026-2222 Public exploit

    code-projects Online Reviewer System btn_functions.php cross site scripting

    A weakness has been identified in code-projects Online Reviewer System 1.0. Affected by this vulnerability is an unknown functionality of the file /system/system/admins/manage/users/btn_functions.php. Executing a manipulation of the argument firstname can lea…

  • Critical 9.2
    CVE-2025-24293 Public exploit

    Active Storage allowed transformation methods that were potentially unsafe

    # Active Storage allowed transformation methods potentially unsafe Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default. The default allowed list contains three methods allow for the circumven…

  • Critical 9.8
    CVE-2026-1340 Exploited Public exploit EPSS 99%

    A code injection in Ivanti Endpoint Manager Mobile allowing attackers to achieve unauthenticated remote code execution.

    KEV Apr 8, 2026
  • Critical 9.8
    CVE-2026-1281 Exploited Public exploit EPSS 99%

    A code injection in Ivanti Endpoint Manager Mobile allowing attackers to achieve unauthenticated remote code execution.

    KEV Jan 29, 2026
  • Critical 10.0
    CVE-2026-24897 Public exploit

    Authenticated Remote Code Execution via Arbitrary File Upload

    Erugo is a self-hosted file-sharing platform. In versions up to and including 0.2.14, an authenticated low-privileged user can upload arbitrary files to any specified location due to insufficient validation of user‑supplied paths when creating shares. By spec…

  • Critical 10.0
    CVE-2026-23830 Public exploit

    SandboxJS has Sandbox Escape via Unprotected AsyncFunction Constructor

    SandboxJS is a JavaScript sandboxing library. Versions prior to 0.8.26 have a sandbox escape vulnerability due to `AsyncFunction` not being isolated in `SandboxFunction`. The library attempts to sandbox code execution by replacing the global `Function` constr…

  • Critical 9.8
    CVE-2026-0768 Public exploit EPSS 28%

    Langflow code Code Injection Remote Code Execution Vulnerability

    Langflow code Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Authentication is not required to exploit this vulnerability. The specific flaw exist…

  • High 8.8
    CVE-2026-22807 Public exploit

    vLLM affected by RCE via auto_map dynamic module loading during model initialization

    vLLM is an inference and serving engine for large language models (LLMs). Starting in version 0.10.1 and prior to version 0.14.0, vLLM loads Hugging Face `auto_map` dynamic modules during model resolution without gating on `trust_remote_code`, allowing attack…

  • High 8.2
    CVE-2026-20045 Exploited Public exploit

    Cisco Unified Communications Products Remote Code Execution Vulnerability

    A vulnerability in Cisco Unified Communications Manager (Unified CM), Cisco Unified Communications Manager Session Management Edition (Unified CM SME), Cisco Unified Communications Manager IM &amp; Presence Service (Unified CM IM&amp;P), Cisco Unity Connectio…

    KEV Jan 21, 2026
  • Critical 9.3
    CVE-2026-23947 Public exploit

    Orval MCP client is vulnerable to code injection via unsanitized x-enum-descriptions in enum generation

    Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions prior to 7.19.0 until 8.0.2 are vulnerable to arbitrary code execution in environments consuming generated clients. This issue is similar in natu…

  • Critical 9.8
    CVE-2025-55423 Public exploit

    A command injection vulnerability exists in the upnp_relay() function in multiple ipTIME router models because the cont…

  • High 7.2
    CVE-2026-23498 Public exploit

    Shopware Improper Control of Generation of Code in Twig rendered views

    Shopware is an open commerce platform. From 6.7.0.0 to before 6.7.6.1, a regression of CVE-2023-2017 leads to an array and array crafted PHP Closure not checked being against allow list for the map(...) override. This vulnerability is fixed in 6.7.6.1.

  • Critical 10.0
    CVE-2026-22686 Public exploit

    Sandbox Escape via Host Error Prototype Chain in enclave-vm

    Enclave is a secure JavaScript sandbox designed for safe AI agent code execution. Prior to 2.7.0, there is a critical sandbox escape vulnerability in enclave-vm that allows untrusted, sandboxed JavaScript code to execute arbitrary code in the host Node.js run…

  • High 8.9
    CVE-2026-22869 Public exploit

    Eigent Allows Arbitrary Code Execution via pull_request_target CI Workflow

    Eigent is a multi-agent Workforce. A critical security vulnerability in the CI workflow (.github/workflows/ci.yml) allows arbitrary code execution from fork pull requests with repository write permissions. The vulnerable workflow uses pull_request_target trig…

  • Critical 10.0
    CVE-2026-21877 Public exploit

    n8n is vulnerable to Remote Code Execution via Arbitrary File Write

    n8n is an open source workflow automation platform. In versions 0.121.2 and below, an authenticated attacker may be able to execute malicious code using the n8n service. This could result in full compromise and can impact both self-hosted and n8n Cloud instan…