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

    Kibana: Improper Control of Generation of Code

    CVE-2023-31415Elastic

    Kibana version 8.7.0 contains an arbitrary code execution flaw. An attacker with All privileges to the Uptime/Synthetics feature could send a request that will attempt to execute JavaScript code. This could lead to the attacker executing arbitrary commands on

  • 8.8 High severity

    Kibana: Improper Control of Generation of Code

    CVE-2023-31414Elastic

    Kibana versions 8.0.0 through 8.7.0 contain an arbitrary code execution flaw. An attacker with write access to Kibana yaml or env configuration could add a specific payload that will attempt to execute JavaScript code. This could lead to the attacker executing

  • 8.8 High severity

    Iuclid: Improper Control of Generation of Code

    CVE-2023-26546Echa.europaEPSS 1.44%

    European Chemicals Agency IUCLID before 6.27.6 allows remote authenticated users to execute arbitrary code via Server Side Template Injection (SSTI) with a crafted template file. The attacker must have template manager permission.

  • 9.8 Critical severity

    Wireless-n Repeater Mini Router Firmware: Improper Control of Generation of Code

    CVE-2023-30404AigitalEPSS 2.23%

    Aigital Wireless-N Repeater Mini_Router v0.131229 was discovered to contain a remote code execution (RCE) vulnerability via the sysCmd parameter in the formSysCmd function. This vulnerability is exploited via a crafted HTTP request.

  • 9.8 Critical severity

    Dawnsparks-node-tesseract: Improper Neutralization of Special Elements used in a Command

    CVE-2023-29566Dawnsparks-node-tesseract ProjectEPSS 2.16%

    huedawn-tesseract 0.3.3 and dawnsparks-node-tesseract 0.4.0 to 0.4.1 was discovered to contain a remote code execution (RCE) vulnerability via the child_process function.

  • 8.8 High severity

    Netact: Improper Control of Generation of Code

    CVE-2023-26060Nokia

    An issue was discovered in Nokia NetAct before 22 FP2211. On the Working Set Manager page, users can create a Working Set with a name that has a client-side template injection payload. Input validation is missing during creation of the working set. For an exte

  • 7.2 High severity

    SolarWinds Platform: Improper Control of Generation of Code

    CVE-2022-36963SolarWinds Platform Command Injection VulnerabilityEPSS 8.09%

    The SolarWinds Platform was susceptible to the Command Injection Vulnerability. This vulnerability allows a remote adversary with a valid SolarWinds Platform admin account to execute arbitrary commands.

  • 9.8 Critical severity

    StruxureWare Data Center Expert: Improper Control of Generation of Code

    CVE-2023-25550Schneider ElectricEPSS 1.18%

    A CWE-94: Improper Control of Generation of Code ('Code Injection') vulnerability exists that allows remote code execution via the “hostname” parameter when maliciously crafted hostname syntax is entered. Affected products: StruxureWare Data Center Expert (V7.

  • 9.8 Critical severity

    StruxureWare Data Center Expert: Improper Control of Generation of Code

    CVE-2023-25549Schneider ElectricEPSS 1.18%

    A CWE-94: Improper Control of Generation of Code ('Code Injection') vulnerability exists that allows for remote code execution when using a parameter of the DCE network settings endpoint. Affected products: StruxureWare Data Center Expert (V7.9.2 and prior)

  • 8.8 High severity

    Shopware 6: Improper Control of Generation of Code

    CVE-2023-2017ShopwareEPSS 2.07%

    Server-side Template Injection (SSTI) in Shopware 6 (<= v6.4.20.0, v6.5.0.0-rc1 <= v6.5.0.0-rc4), affecting both shopware/core and shopware/platform GitHub repositories, allows remote attackers with access to a Twig environment without the Sandbox extension to

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-30537XWikiEPSS 1.04%

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any user with the right to add an object on a page can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki insta

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29509XWikiEPSS 76.2%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation.

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29214XWikiEPSS 1.19%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with edit rights can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root cause is improper escapi

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29212XWikiEPSS 1.19%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with edit rights can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root cause is improper escapi

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29211XWikiEPSS 1.19%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights `WikiManager.DeleteWiki` can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29210XWikiEPSS 1.19%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents including the notification preferences macros can execute arbitrary Groovy, Python or Velocity code in XWiki lead

  • 8.8 High severity

    xwiki-platform: Improper Control of Generation of Code

    CVE-2023-29209XWikiEPSS 1.14%

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents including the legacy notification activity macro can execute arbitrary Groovy, Python or Velocity code in XWiki l

  • 9.8 Critical severity

    DedeCMS: Improper Control of Generation of Code

    CVE-2023-2056DedeCMS

    A vulnerability was found in DedeCMS up to 5.7.87 and classified as critical. This issue affects the function GetSystemFile of the file module_main.php. The manipulation leads to code injection. The attack may be initiated remotely. The exploit has been disclo

  • 7.2 High severity

    Unify Openscape Bcf: Improper Neutralization of Special Elements used in a Command

    CVE-2023-30638Atos

    Atos Unify OpenScape SBC 10 before 10R3.1.3, OpenScape Branch 10 before 10R3.1.2, and OpenScape BCF 10 before 10R10.7.0 allow remote authenticated admins to inject commands.

  • 9.8 Critical severity

    Novi Survey Insecure Deserialization Exploited

    CVE-2023-29492NovisurveyEPSS 2.69%

    Novi Survey before 8.9.43676 allows remote attackers to execute arbitrary code on the server in the context of the service account. This does not provide access to stored survey or response data.

  • 9.8 Critical severity

    taoCMS: Improper Control of Generation of Code

    CVE-2023-1947taoCMSEPSS 1.06%

    A vulnerability was found in taoCMS 3.0.2. It has been classified as critical. Affected is an unknown function of the file /admin/admin.php. The manipulation leads to code injection. It is possible to launch the attack remotely. The exploit has been disclosed

  • 9.8 Critical severity

    Apache Airflow Hive Provider: Improper Control of Generation of Code

    CVE-2023-28706ApacheEPSS 2.77%

    Improper Control of Generation of Code ('Code Injection') vulnerability in Apache Software Foundation Apache Airflow Hive Provider.This issue affects Apache Airflow Hive Provider: before 6.0.0.

  • 8.8 High severity

    Codefever: Improper Control of Generation of Code

    CVE-2023-26817PgyerEPSS 1.5%

    codefever before 2023.2.7-commit-b1c2e7f was discovered to contain a remote code execution (RCE) vulnerability via the component /controllers/api/user.php.

  • 9.8 Critical severity

    html/template: Improper Control of Generation of Code

    CVE-2023-24538Go standard libraryEPSS 2.28%

    Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the

  • 9.8 Critical severity

    GitLab: Improper Neutralization of Special Elements used in a Command

    CVE-2023-1708GitLabEPSS 1.11%

    An issue was identified in GitLab CE/EE affecting all versions from 1.0 prior to 15.8.5, 15.9 prior to 15.9.4, and 15.10 prior to 15.10.1 where non-printable characters gets copied from clipboard, allowing unexpected commands to be executed on victim machine.

  • 7.8 High severity

    Edraw-max: Untrusted Search Path

    CVE-2023-27770Wondershare

    An issue found in Wondershare Technology Co.,Ltd Edraw-max v.12.0.4 allows a remote attacker to execute arbitrary commands via the edraw-max_setup_full5371.exe file.

  • 8.8 High severity

    Pentaho Business Analytics Server: Improper Control of Generation of Code

    CVE-2022-43938Hitachi VantaraEPSS 26.4%

    Hitachi Vantara Pentaho Business Analytics Server prior to versions 9.4.0.1 and 9.3.0.2, including 8.3.x cannot allow a system administrator to disable scripting capabilities of Pentaho Reports (*.prpt) through the JVM script manager.

  • 7.2 High severity

    Hitachi Vantara Pentaho BA Server Special Element Injection Exploited

    CVE-2022-43769Hitachi VantaraEPSS 97.7%

    Hitachi Vantara Pentaho Business Analytics Server prior to versions 9.4.0.1 and 9.3.0.2, including 8.3.x allow certain web services to set property values which contain Spring templates that are interpreted downstream.

  • 9.8 Critical severity

    net.sourceforge.htmlunit:htmlunit: Improper Control of Generation of Code

    CVE-2023-26119Net.sourceforge.htmlunit:htmlunitEPSS 2.51%

    Versions of the package net.sourceforge.htmlunit:htmlunit from 0 and before 3.0.0 are vulnerable to Remote Code Execution (RCE) via XSTL, when browsing the attacker’s webpage.

  • 9.8 Critical severity

    Rockoa: Improper Control of Generation of Code

    CVE-2023-1773RockOAEPSS 1.64%

    A vulnerability was found in Rockoa 2.3.2. It has been declared as critical. This vulnerability affects unknown code of the file webmainConfig.php of the component Configuration File Handler. The manipulation leads to code injection. The attack can be initiate

  • 9.8 Critical severity

    Designer: Improper Control of Generation of Code

    CVE-2023-25261StimulsoftEPSS 1.9%

    Certain Stimulsoft GmbH products are affected by: Remote Code Execution. This affects Stimulsoft Designer (Desktop) 2023.1.4 and Stimulsoft Designer (Web) 2023.1.3 and Stimulsoft Viewer (Web) 2023.1.3. Access to the local file system is not prohibited in any w

  • 7.2 High severity

    SPAM SQR: Improper Control of Generation of Code

    CVE-2023-24835Softnext

    Softnext Technologies Corp.’s SPAM SQR has a vulnerability of Code Injection within its specific function. An authenticated remote attacker with administrator privilege can exploit this vulnerability to execute arbitrary system command to perform arbitrary sys

  • 7.8 High severity

    Apache OpenOffice: Improper Control of Generation of Code

    CVE-2022-38745Apache

    Apache OpenOffice versions before 4.1.14 may be configured to add an empty entry to the Java class path. This may lead to run arbitrary Java code from the current directory.

  • 9.8 Critical severity

    Moodle: Improper Control of Generation of Code

    CVE-2023-28333MoodleEPSS 1.17%

    The Mustache pix helper contained a potential Mustache injection risk if combined with user input (note: This did not appear to be implemented/exploitable anywhere in the core Moodle LMS).

  • 8.8 High severity

    InsightCloudSec: Improper Control of Generation of Code

    CVE-2023-1306Rapid7EPSS 1.21%

    An authenticated attacker can leverage an exposed resource.db() accessor method to smuggle Python method calls via a Jinja template, which can lead to code execution. This issue was resolved in the Managed and SaaS deployments on February 1, 2023, and in versi

  • 8.8 High severity

    InsightCloudSec: Improper Control of Generation of Code

    CVE-2023-1304Rapid7EPSS 1.08%

    An authenticated attacker can leverage an exposed getattr() method via a Jinja template to smuggle OS commands and perform other actions that are normally expected to be private methods. This issue was resolved in the Managed and SaaS deployments on February 1

  • 7.8 High severity

    OTRS: Improper Control of Generation of Code

    CVE-2023-1250OTRS

    Improper Input Validation vulnerability in OTRS AG OTRS (ACL modules), OTRS AG ((OTRS)) Community Edition (ACL modules) allows Local Execution of Code. When creating/importing an ACL it was possible to inject code that gets executed via manipulated comments an

  • 8.8 High severity

    HkCms: Improper Control of Generation of Code

    CVE-2023-1482HkCms

    A vulnerability, which was classified as problematic, was found in HkCms 2.2.4.230206. This affects an unknown part of the file /admin.php/appcenter/local.html?type=addon of the component External Plugin Handler. The manipulation leads to code injection. It is

  • 9.8 Critical severity

    Proficy iFIX: Improper Control of Generation of Code

    CVE-2023-0598GE Digital

    GE Digital Proficy iFIX 2022, GE Digital Proficy iFIX v6.1, and GE Digital Proficy iFIX v6.5 are vulnerable to code injection, which may allow an attacker to insert malicious configuration files in the expected web server execution path and gain full control o

  • 9.8 Critical severity

    Swig-templates: Improper Control of Generation of Code

    CVE-2023-25344Swig-templates ProjectEPSS 1.03%

    An issue was discovered in swig-templates thru 2.0.4 and swig thru 1.4.2, allows attackers to execute arbitrary code via crafted Object.prototype anonymous function.