CyberSecBulletin

Improper Control of Generation of Code

CWE-94

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.

We track 2,468 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 8.8. 82 have been exploited in real attacks.

How this weakness is prevented

  • Architecture and Design: Refactor your program so that you do not have to dynamically generate code.
  • 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.
  • 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.
  • 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).
  • 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).

Latest Improper Control of Generation of Code vulnerabilities

  • 8.8 High severity

    Acom508 Firmware: Improper Control of Generation of Code

    CVE-2022-23332EjointechEPSS 5.06%

    Command injection vulnerability in Manual Ping Form (Web UI) in Shenzhen Ejoin Information Technology Co., Ltd. ACOM508/ACOM516/ACOM532 609-915-041-100-020 allows a remote attacker to inject arbitrary code via the field.

  • 7.2 High severity

    sourcegraph: Improper Control of Generation of Code

    CVE-2022-29171SourcegraphEPSS 1.35%

    Sourcegraph is a fast and featureful code search and navigation engine. Versions before 3.38.0 are vulnerable to Remote Code Execution in the gitserver service. The Gitolite code host integration with Phabricator allows Sourcegraph site admins to specify a `ca

  • 9.9 Critical severity

    flux2: Improper Control of Generation of Code

    CVE-2022-24817FluxcdEPSS 1.12%

    Flux2 is an open and extensible continuous delivery solution for Kubernetes. Flux2 versions between 0.1.0 and 0.29.0, helm-controller 0.1.0 to v0.19.0, and kustomize-controller 0.1.0 to v0.23.0 are vulnerable to Code Injection via malicious Kubeconfig. In mult

  • 9.6 Critical severity

    jgraph/drawio: Improper Neutralization of Input During Web Page Generation

    CVE-2022-1575JgraphEPSS 2.4%

    Arbitrary Code Execution through Sanitizer Bypass in GitHub repository jgraph/drawio prior to 18.0.0. - Arbitrary (remote) code execution in the desktop app. - Stored XSS in the web app.

  • 7.8 High severity

    redis: Improper Control of Generation of Code

    CVE-2022-24735RedisEPSS 2.25%

    Redis is an in-memory database that persists on disk. By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis prior to version 7.0.0 or 6.2.7 can inject Lua code that will execute with the (potentially higher) privile

  • 9.8 Critical severity

    Ballcat Codegen provides the function of online editing code to generate templates.

    CVE-2022-24881Ballcat-projectsEPSS 3.2%

    Ballcat Codegen provides the function of online editing code to generate templates. In versions prior to 1.0.0.beta.2, attackers can implement remote code execution through malicious code injection of the template engine. This happens because Velocity and free

  • 9.8 Critical severity

    Ejs: Improper Control of Generation of Code

    CVE-2022-29078EjsEPSS 32.8%

    The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view options][outputFunctionName]. This is parsed as an internal option, and overwrites the outputFunctionName option with an arbitrary OS c

  • 7.2 High severity

    Ad Injection: Improper Control of Generation of Code

    CVE-2022-0661Ad InjectionEPSS 40.2%

    The Ad Injection WordPress plugin through 1.2.0.19 does not properly sanitize the body of the adverts injected into the pages, allowing a high privileged user (Admin+) to inject arbitrary HTML or javascript even with unfiltered_html disallowed, leading to a st

  • 10.0 Critical severity

    OSGeo GeoServer JAI-EXT Code Injection Exploited

    CVE-2022-24816Geosolutions-itEPSS 99.9%

    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 e

  • 7.8 High severity

    Accessibility: Files or Directories Accessible to External Parties

    CVE-2022-27837Samsung

    A vulnerability using PendingIntent in Accessibility prior to version 12.5.3.2 in Android R(11.0) and 13.0.1.1 in Android S(12.0) allows attacker to access the file with system privilege.

  • 9.8 Critical severity

    VMware Workspace ONE Access and Identity Manager Server-Side Template Injection Exploited

    CVE-2022-22954VMware Workspace ONE Access and Identity ManagerEPSS 100%

    VMware Workspace ONE Access and Identity Manager contain a remote code execution vulnerability due to server-side template injection. A malicious actor with network access can trigger a server-side template injection that may result in remote code execution.

  • 8.8 High severity

    iTop: Improper Control of Generation of Code

    CVE-2022-24780CombodoEPSS 5.7%

    Combodo iTop is a web based IT Service Management tool. In versions prior to 2.7.6 and 3.0.0, users of the iTop user portal can send TWIG code to the server by forging specific http queries, and execute arbitrary code on the server using http server user privi

  • 7.2 High severity

    Simple Machines Forum: Improper Control of Generation of Code

    CVE-2022-26982SimpleMachinesEPSS 9.19%

    SimpleMachinesForum 2.1.1 and earlier allows remote authenticated administrators to execute arbitrary code by inserting a vulnerable php code because the themes can be modified by an administrator. NOTE: the vendor's position is that administrators are intende

  • 9.8 Critical severity

    Spring Framework JDK 9+ Remote Code Execution Exploited

    CVE-2022-22965Spring FrameworkEPSS 99.6%

    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

  • 9.8 Critical severity

    VMware Tanzu Spring Cloud Function Remote Code Execution Exploited

    CVE-2022-22963Spring Cloud FunctionEPSS 99.9%

    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 r

  • 7.2 High severity

    Studio 5000 Logix Designer: Improper Control of Generation of Code

    CVE-2022-1159Rockwell AutomationEPSS 3.45%

    Rockwell Automation Studio 5000 Logix Designer (all versions) are vulnerable when an attacker who achieves administrator access on a workstation running Studio 5000 Logix Designer could inject controller code undetectable to a user.

  • 9.8 Critical severity

    accesslog: Improper Control of Generation of Code

    CVE-2022-25760AccesslogEPSS 1.64%

    All versions of package accesslog are vulnerable to Arbitrary Code Injection due to the usage of the Function constructor without input sanitization. If (attacker-controlled) user input is given to the format option of the package's exported constructor functi

  • 8.8 High severity

    CRI-O: Improper Control of Generation of Code

    CVE-2022-0811Cri-oEPSS 19%

    A flaw was found in CRI-O in the way it set kernel options for a pod. This issue allows anyone with rights to deploy a pod on a Kubernetes cluster that uses the CRI-O runtime to achieve a container escape and arbitrary code execution as root on the cluster nod

  • 8.8 High severity

    IPCOMM ipDIO: Improper Control of Generation of Code

    CVE-2022-24915IpcommEPSS 1.01%

    The absence of filters when loading some sections in the web application of the vulnerable device allows attackers to inject malicious code that will be interpreted when a legitimate user accesses the web section where the information is displayed. Injection c

  • 8.8 High severity

    IPCOMM ipDIO: Improper Control of Generation of Code

    CVE-2022-22985IpcommEPSS 1.04%

    The absence of filters when loading some sections in the web application of the vulnerable device allows attackers to inject malicious code that will be interpreted when a legitimate user accesses the specific web section where the information is displayed. In

  • 7.2 High severity

    mybb: Improper Control of Generation of Code

    CVE-2022-24734MyBBEPSS 77.8%

    MyBB is a free and open source forum software. In affected versions the Admin CP's Settings management module does not validate setting types correctly on insertion and update, making it possible to add settings of supported type `php` with PHP code, executed

  • 10.0 Critical severity

    VMware Spring Cloud Gateway Code Injection Exploited

    CVE-2022-22947Spring Cloud GatewayEPSS 98.3%

    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 all

  • 8.8 High severity

    Hoteldruid: Improper Control of Generation of Code

    CVE-2022-22909DigitaldruidEPSS 45.4%

    HotelDruid v3.0.3 was discovered to contain a remote code execution (RCE) vulnerability which is exploited via an attacker inserting a crafted payload into the name field under the Create New Room module.

  • 8.8 High severity

    sourcegraph: Missing Authorization

    CVE-2022-23642SourcegraphEPSS 74.3%

    Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service acts as a git exec proxy, and fails to properly restrict calling `git config`. This allows an a

  • 8.8 High severity

    PHP Everywhere: Improper Control of Generation of Code

    CVE-2022-24665Alexander FuchsEPSS 2.62%

    PHP Everywhere <= 2.0.3 included functionality that allowed execution of PHP Code Snippets via a WordPress gutenberg block by any user able to edit posts.

  • 8.8 High severity

    PHP Everywhere: Improper Control of Generation of Code

    CVE-2022-24664Alexander FuchsEPSS 1.66%

    PHP Everywhere <= 2.0.3 included functionality that allowed execution of PHP Code Snippets via WordPress metaboxes, which could be used by any user able to edit posts.

  • 8.8 High severity

    PHP Everywhere: Improper Control of Generation of Code

    CVE-2022-24663Alexander FuchsEPSS 2.06%

    PHP Everywhere <= 2.0.3 included functionality that allowed execution of PHP Code Snippets via WordPress shortcodes, which can be used by any authenticated user.

  • 9.8 Critical severity

    superjson: Improperly Controlled Modification of Object Prototype Attributes

    CVE-2022-23631Blitz-jsEPSS 2.68%

    superjson is a program to allow JavaScript expressions to be serialized to a superset of JSON. In versions prior to 1.8.1 superjson allows input to run arbitrary code on any server using superjson input without prior authentication or knowledge. The only requi

  • 9.8 Critical severity

    Twig: Improper Control of Generation of Code

    CVE-2022-23614TwigphpEPSS 8.21%

    Twig is an open source template language for PHP. When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions. In affected versions this constraint was not properly enforced

  • 9.8 Critical severity

    PrestaShop: Improper Control of Generation of Code

    CVE-2022-21686PrestaShopEPSS 1.79%

    PrestaShop is an Open Source e-commerce platform. Starting with version 1.7.0.0 and ending with version 1.7.8.3, an attacker is able to inject twig code inside the back office when using the legacy layout. The problem is fixed in version 1.7.8.3. There are no

  • 7.8 High severity

    Trend Micro Deep Security Agent for Linux: Improper Control of Generation of Code

    CVE-2022-23120Trend MicroEPSS 6.38%

    A code injection vulnerability in Trend Micro Deep Security and Cloud One - Workload Security Agent for Linux version 20 and below could allow an attacker to escalate privileges and run arbitrary code in the context of root. Please note: an attacker must first

  • 7.1 High severity

    Bixby Routines: Improper Control of Generation of Code

    CVE-2022-22286Samsung

    A vulnerability using PendingIntent in Bixby Routines prior to version 3.1.21.8 in Android R(11.0) and 2.6.30.5 in Android Q(10.0) allows attackers to execute privileged action by hijacking and modifying the intent.

  • 7.1 High severity

    Reminder: Improper Control of Generation of Code

    CVE-2022-22285Samsung

    A vulnerability using PendingIntent in Reminder prior to version 12.2.05.0 in Android R(11.0) and 12.3.02.1000 in Android S(12.0) allows attackers to execute privileged action by hijacking and modifying the intent.

  • 9.8 Critical severity

    Ivanti Endpoint Manager Cloud Service Appliance (EPM CSA) Code Injection Exploited

    CVE-2021-44529Ivanti EPMEPSS 99.1%

    A code injection vulnerability in the Ivanti EPM Cloud Services Appliance (CSA) allows an unauthenticated user to execute arbitrary code with limited permissions (nobody).

  • 8.5 High severity

    XStream Remote Code Execution Exploited

    CVE-2021-39144X-streamEPSS 98.1%

    XStream is a simple library to serialize objects to XML and back again. In affected versions this vulnerability may allow a remote attacker has sufficient rights to execute commands of the host only by manipulating the processed input stream. No user is affect

  • 7.2 High severity

    Ivanti Pulse Connect Secure Unrestricted File Upload Exploited

    CVE-2021-22900Pulse Secure SecureEPSS 14.1%

    A vulnerability allowed multiple unrestricted uploads in Pulse Connect Secure before 9.1R11.4 that could lead to an authenticated administrator to perform a file write via a maliciously crafted archive upload in the administrator web interface.

  • 8.8 High severity

    Ivanti Pulse Connect Secure Collaboration Suite Buffer Overflow Exploited

    CVE-2021-22894Pulse Connect SecureEPSS 41.3%

    A buffer overflow vulnerability exists in Pulse Connect Secure before 9.1R11.4 allows a remote authenticated attacker to execute arbitrary code as the root user via maliciously crafted meeting room.

  • 10.0 Critical severity

    GitLab Community and Enterprise Editions Remote Code Execution Exploited

    CVE-2021-22205GitLabEPSS 99.7%

    An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. GitLab was not properly validating image files that were passed to a file parser which resulted in a remote command execution.

  • 7.8 High severity

    ExifTool Remote Code Execution Exploited

    CVE-2021-22204ExifToolEPSS 100%

    Improper neutralization of user data in the DjVu file format in ExifTool versions 7.44 and up allows arbitrary code execution when parsing the malicious image

  • 7.2 High severity

    Ivanti Pulse Connect Secure Code Execution Exploited

    CVE-2020-8243Pulse Connect SecreEPSS 90.8%

    A vulnerability in the Pulse Connect Secure < 9.1R8.2 admin web interface could allow an authenticated attacker to upload custom template to perform an arbitrary code execution.