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

42 results · Clear filters · Feed

  • Critical 9.1
    CVE-2026-58400 Exploited

    GeoNetwork vulnerable to Remote Code Execution via unsafe Saxon XSLT processor configuration in formatter

    GeoNetwork is a catalog application to manage spatially referenced resources. Prior to versions 4.4.12 and 4.2.17, the Saxon XSLT processor used to render formatters is configured without secure processing (`FEATURE_SECURE_PROCESSING`) and without disabling J…

  • Critical 9.8
    CVE-2026-60004 Exploited Public exploit Scanner template EPSS 24%

    Gitea: Remote Code Execution via diffpatch Git Hook Installation

    Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.

    KEV Aug 25, 2026
  • Critical 9.0
    CVE-2026-72530 Exploited Public exploit

    A remote unauthorized attacker with network access via port 4307/TCP to the TrueConf server versions 5.3.X to 5.3.9, 5.…

    KEV Aug 20, 2026
  • Critical 9.8
    CVE-2026-9198 Exploited Public exploit Scanner template EPSS 29%

    Unauthenticated Remote Code Execution via Auto-Login Bypass and Code Validation

    IBM Langflow OSS 1.0.0 through 1.10.0 allows unauthenticated attackers to chain /api/v1/auto_login (mints SUPERUSER tokens to any network caller) with /api/v1/validate/code (executes user code via exec()) to achieve full RCE on default Langflow deployments

    KEV Aug 4, 2026
  • Critical 9.3
    CVE-2026-33017 Exploited Public exploit Scanner template EPSS 96%

    Langflow has Unauthenticated Remote Code Execution via Public Flow Build Endpoint

    Langflow is a tool for building and deploying AI-powered agents and workflows. In versions prior to 1.9.0, the POST /api/v1/build_public_tmp/{flow_id}/flow endpoint allows building public flows without requiring authentication. When the optional data paramete…

    KEV Mar 25, 2026
  • Critical 9.8
    CVE-2026-1340 Exploited Public exploit Scanner template 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 Scanner template 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-2025-37164 Exploited Public exploit Scanner template EPSS 90%

    A remote code execution issue exists in HPE OneView.

    KEV Jan 7, 2026
  • Critical 9.4
    CVE-2025-62593 Exploited Public exploit Scanner template EPSS 60%

    Ray is vulnerable to RCE via Safari & Firefox Browsers through DNS Rebinding Attack

    Ray is an AI compute engine. Prior to version 2.52.0, developers working with Ray as a development tool can be exploited via a critical RCE vulnerability exploitable via Firefox and Safari. This vulnerability is due to an insufficient guard against browser-ba…

    KEV Aug 17, 2026
  • Critical 9.2
    CVE-2025-54068 Exploited Public exploit Scanner template EPSS 96%

    Livewire vulnerable to remote command execution during property update hydration

    Livewire is a full-stack framework for Laravel. In Livewire v3 up to and including v3.6.3, a vulnerability allows unauthenticated attackers to achieve remote command execution in specific scenarios. The issue stems from how certain component property updates …

    KEV Mar 20, 2026
  • Critical 10.0
    CVE-2025-32432 Exploited Public exploit Scanner template EPSS 100%

    Craft CMS Allows Remote Code Execution

    Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Starting from version 3.0.0-RC1 to before 3.9.15, 4.0.0-RC1 to before 4.14.15, and 5.0.0-RC1 to before 5.6.17, Craft is vulnerable to remote code execution. …

    KEV Mar 20, 2026
  • Critical 9.8
    CVE-2025-24893 Exploited Public exploit Scanner template EPSS 100%

    Remote code execution as guest via SolrSearchMacros request in xwiki

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any guest can perform arbitrary remote code execution through a request to `SolrSearch`. This impacts the confidentiality, integrity and availability of t…

    KEV Oct 30, 2025
  • Critical 9.3
    CVE-2024-56145 Exploited Public exploit Scanner template EPSS 97%

    RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms

    Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified…

    KEV Jun 2, 2025
  • Critical 9.8
    CVE-2024-36401 Exploited Public exploit Scanner template EPSS 100%

    Remote Code Execution (RCE) vulnerability in evaluating property name expressions in Geoserver

    GeoServer is an open source server that allows users to share and edit geospatial data. Prior to versions 2.22.6, 2.23.6, 2.24.4, and 2.25.2, multiple OGC request parameters allow Remote Code Execution (RCE) by unauthenticated users through specially crafted …

    KEV Jul 15, 2024
  • Critical 9.8
    CVE-2023-3519 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Unauthenticated remote code execution

    KEV Jul 19, 2023
  • Critical 9.8
    CVE-2023-33246 Exploited Public exploit Scanner template EPSS 97%

    Apache RocketMQ: Possible remote code execution vulnerability when using the update configuration function

    For RocketMQ versions 5.1.0 and below, under certain conditions, there is a risk of remote command execution.  Several components of RocketMQ, including NameServer, Broker, and Controller, are leaked on the extranet and lack permission verification, an attack…

    KEV Sep 6, 2023
  • Critical 9.8
    CVE-2023-29492 Exploited

    Novi Survey before 8.9.43676 allows remote attackers to execute arbitrary code on the server in the context of the serv…

    KEV Apr 13, 2023
  • Critical 9.8
    CVE-2023-25717 Exploited Scanner template EPSS 98%

    Ruckus Wireless Admin through 10.4 allows Remote Code Execution via an unauthenticated HTTP GET Request, as demonstrate…

    KEV May 12, 2023
  • Critical 9.8
    CVE-2022-3236 Exploited Scanner template EPSS 99%

    A code injection vulnerability in the User Portal and Webadmin allows a remote attacker to execute code in Sophos Firew…

    KEV Sep 23, 2022
  • Critical 10.0
    CVE-2022-24816 Exploited Public exploit Scanner template EPSS 100%

    Improper Control of Generation of Code in jai-ext

    JAI-EXT is an open-source project which aims to extend the Java Advanced Imaging (JAI) API. Programs allowing Jiffle script to be provided via network request can lead to a Remote Code Execution as the Jiffle script is compiled into Java code via Janino, and …

    KEV Jun 26, 2024
  • Critical 9.8
    CVE-2022-22954 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    VMware Workspace ONE Access and Identity Manager contain a remote code execution vulnerability due to server-side templ…

    KEV Apr 14, 2022
  • Critical 9.8
    CVE-2022-22965 Exploited Public exploit Scanner template EPSS 100%

    Remote Code Execution in Spring Framework

    A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot…

    KEV Apr 4, 2022
  • Critical 9.8
    CVE-2022-22963 Exploited Public exploit Scanner template EPSS 100%

    Spring Cloud Function Code Injection with a specially crafted SpEL as a routing expression

    In Spring Cloud Function versions 3.1.6, 3.2.2 and older unsupported versions, when using routing functionality it is possible for a user to provide a specially crafted SpEL as a routing-expression that may result in remote code execution and access to local …

    KEV Aug 25, 2022
  • Critical 10.0
    CVE-2022-22947 Exploited Public exploit Scanner template EPSS 98%

    Spring Cloud Gateway vulnerable to Code Injection when Gateway Actuator endpoint enabled, exposed, unsecured

    In spring cloud gateway versions prior to 3.1.1+ and 3.0.7+ , applications are vulnerable to a code injection attack when the Gateway Actuator endpoint is enabled, exposed and unsecured. A remote attacker could make a maliciously crafted request that could al…

    KEV May 16, 2022
  • Critical 9.8
    CVE-2021-44529 Exploited · Ransomware Public exploit Scanner template EPSS 99%

    A code injection vulnerability in the Ivanti EPM Cloud Services Appliance (CSA) allows an unauthenticated user to execu…

    KEV Mar 25, 2024
  • Critical 10.0
    CVE-2021-22205 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. GitLab was not properly validat…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2021-3129 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Unauthenticated remote code execution in Ignition

    Ignition before 2.5.2, as used in Laravel and other products, allows unauthenticated remote attackers to execute arbitrary code because of insecure usage of file_get_contents() and file_put_contents(). This is exploitable on sites using debug mode with Larave…

    KEV Sep 18, 2023
  • Critical 9.8
    CVE-2020-17530 Exploited Public exploit Scanner template EPSS 96%

    Remote code execution in Apache Struts

    Forced OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution. Affected software : Apache Struts 2.0.0 - Struts 2.5.25.

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2020-8644 Exploited Public exploit Scanner template EPSS 86%

    PlaySMS before 1.4.3 does not sanitize inputs from a malicious string.

    KEV Nov 3, 2021
  • Critical 9.9
    CVE-2019-10758 Exploited Public exploit Scanner template EPSS 85%

    Remote Code Execution Vulnerability in NPM mongo-express

    mongo-express before 0.54.0 is vulnerable to Remote Code Execution via endpoints that uses the `toBSON` method. A misuse of the `vm` dependency to perform `exec` commands in a non-safe environment.

    KEV Dec 10, 2021
  • Critical 10.0
    CVE-2019-4716 Exploited Public exploit Scanner template EPSS 86%

    IBM Planning Analytics 2.0.0 through 2.0.8 is vulnerable to a configuration overwrite that allows an unauthenticated us…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2019-16759 Exploited Public exploit Scanner template EPSS 100%

    vBulletin 5.x through 5.5.4 allows remote command execution via the widgetConfig[code] parameter in an ajax/render/widg…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2019-7609 Exploited Public exploit Scanner template EPSS 95%

    Kibana versions before 5.6.15 and 6.6.1 contain an arbitrary code execution flaw in the Timelion visualizer. An attacke…

    KEV Jan 10, 2022
  • Critical 9.8
    CVE-2018-14667 Exploited Public exploit EPSS 74%

    Richfaces vulnerable to arbitrary code execution

    The RichFaces Framework 3.X through 3.3.4 is vulnerable to Expression Language (EL) injection via the UserResource resource. A remote, unauthenticated attacker could exploit this to execute arbitrary code using a chain of java serialized objects via org.ajax4…

    KEV Sep 28, 2023
  • Critical 9.8
    CVE-2018-1273 Exploited · Ransomware Public exploit Scanner template EPSS 97%

    Spring Data Commons remote code injection vulnerability

    Spring Data Commons, versions prior to 1.13 to 1.13.10, 2.0 to 2.0.5, and older unsupported versions, contain a property binder vulnerability caused by improper neutralization of special elements. An unauthenticated remote malicious user (or attacker) can sup…

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2017-9841 Exploited Public exploit Scanner template EPSS 100%

    Code Injection in PHPUnit

    Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., ex…

    KEV Feb 15, 2022
  • Critical 9.8
    CVE-2017-7494 Exploited · Ransomware Public exploit EPSS 99%

    Samba since version 3.5.0 and before 4.6.4, 4.5.10 and 4.4.14 is vulnerable to remote code execution vulnerability, all…

    KEV Mar 30, 2023
  • Critical 9.8
    CVE-2015-1635 Exploited Public exploit Scanner template EPSS 100%

    HTTP.sys in Microsoft Windows 7 SP1, Windows Server 2008 R2 SP1, Windows 8, Windows 8.1, and Windows Server 2012 Gold a…

    KEV Feb 10, 2022
  • Critical 9.8
    CVE-2014-6287 Exploited Public exploit Scanner template EPSS 99%

    The findMacroMarker function in parserLib.pas in Rejetto HTTP File Server (aks HFS or HttpFileServer) 2.3x before 2.3c …

    KEV Mar 25, 2022
  • Critical 9.8
    CVE-2013-4810 Exploited Public exploit EPSS 79%

    HP ProCurve Manager (PCM) 3.20 and 4.0, PCM+ 3.20 and 4.0, Identity Driven Manager (IDM) 4.0, and Application Lifecycle…

    KEV Mar 25, 2022