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

    github-workflows: Improper Control of Generation of Code

    CVE-2022-39326KartverketEPSS 1.69%

    kartverket/github-workflows are shared reusable workflows for GitHub Actions. Prior to version 2.7.5, all users of the `run-terraform` reusable workflow from the kartverket/github-workflows repo are affected by a code injection vulnerability. A malicious actor

  • 8.8 High severity

    Jenkins Katalon Plugin: Improper Control of Generation of Code

    CVE-2022-43416JenkinsEPSS 1.34%

    Jenkins Katalon Plugin 1.0.32 and earlier implements an agent/controller message that does not limit where it can be executed and allows invoking Katalon with configurable arguments, allowing attackers able to control agent processes to invoke Katalon on the J

  • 8.1 High severity

    VM VirtualBox: Improper Control of Generation of Code

    CVE-2022-39424OracleEPSS 1.62%

    Vulnerability in the Oracle VM VirtualBox product of Oracle Virtualization (component: Core). Supported versions that are affected are Prior to 6.1.40. Difficult to exploit vulnerability allows unauthenticated attacker with network access via VRDP to compromis

  • 7.8 High severity

    HarmonyOS: Improper Control of Generation of Code

    CVE-2022-41576Huawei

    The rphone module has a script that can be maliciously modified.Successful exploitation of this vulnerability may cause irreversible programs to be implanted on user devices.

  • 7.2 High severity

    october: Improper Control of Generation of Code

    CVE-2022-35944OctoberCMSEPSS 1.05%

    October is a self-hosted Content Management System (CMS) platform based on the Laravel PHP Framework. This vulnerability only affects installations that rely on the safe mode restriction, commonly used when providing public access to the admin panel. Assuming

  • 7.2 High severity

    Online Diagnostic Lab Management System: Unrestricted Upload of File with Dangerous Type

    CVE-2022-41534Online Diagnostic Lab Management System ProjectEPSS 1.54%

    Online Diagnostic Lab Management System v1.0 was discovered to contain an arbitrary file upload vulnerability via the component /php_action/createOrder.php. This vulnerability allows attackers to execute arbitrary code via a crafted PHP file.

  • 9.8 Critical severity

    Apache Commons Text: Improper Control of Generation of Code

    CVE-2022-42889ApacheEPSS 99.9%

    Apache Commons Text performs variable interpolation, allowing properties to be dynamically evaluated and expanded. The standard format for interpolation is "${prefix:name}", where "prefix" is used to locate an instance of org.apache.commons.text.lookup.StringL

  • 8.8 High severity

    Lava: Improper Control of Generation of Code

    CVE-2022-42902LinaroEPSS 1.68%

    In Linaro Automated Validation Architecture (LAVA) before 2022.10, there is dynamic code execution in lava_server/lavatable.py. Due to improper input sanitization, an anonymous user can force the lava-server-gunicorn service to execute user-provided code on th

  • 9.8 Critical severity

    Dolibarr Erp/crm: Improper Control of Generation of Code

    CVE-2022-40871DolibarrEPSS 34.6%

    Dolibarr ERP & CRM <=15.0.3 is vulnerable to Eval injection. By default, any administrator can be added to the installation page of dolibarr, and if successfully added, malicious code can be inserted into the database and then execute it by eval.

  • 7.8 High severity

    Gridea: Improper Control of Generation of Code

    CVE-2022-40274Gridea

    Gridea version 0.9.3 allows an external attacker to execute arbitrary code remotely on any client attempting to view a malicious markdown file through Gridea. This is possible because the application has the 'nodeIntegration' option enabled.

  • 8.8 High severity

    Archer Ax10 V1 Firmware: Improper Control of Generation of Code

    CVE-2022-40486TP-LinkEPSS 2.09%

    TP Link Archer AX10 V1 Firmware Version 1.3.1 Build 20220401 Rel. 57450(5553) was discovered to allow authenticated attackers to execute arbitrary code via a crafted backup file.

  • 8.8 High severity

    Wazuh: Improper Control of Generation of Code

    CVE-2022-40497WazuhEPSS 1.61%

    Wazuh v3.6.1 - v3.13.5, v4.0.0 - v4.2.7, and v4.3.0 - v4.3.7 were discovered to contain an authenticated remote code execution (RCE) vulnerability via the Active Response endpoint.

  • 9.8 Critical severity

    joblib: Improper Control of Generation of Code

    CVE-2022-21797JoblibEPSS 2.63%

    The package joblib from 0 and before 1.2.0 are vulnerable to Arbitrary Code Execution via the pre_dispatch flag in Parallel() class due to the eval() statement.

  • 9.8 Critical severity

    Firewall: Improper Control of Generation of Code

    CVE-2022-40628TacitineEPSS 2.24%

    This vulnerability exists in Tacitine Firewall, all versions of EN6200-PRIME QUAD-35 and EN6200-PRIME QUAD-100 between 19.1.1 to 22.20.1 (inclusive), due to improper control of code generation in the Tacitine Firewall web-based management interface. An unauthe

  • 9.8 Critical severity

    Sophos Firewall Code Injection Exploited

    CVE-2022-3236SophosEPSS 98.9%

    A code injection vulnerability in the User Portal and Webadmin allows a remote attacker to execute code in Sophos Firewall version v19.0 MR1 and older.

  • 9.8 Critical severity

    Apache Pinot: Improper Control of Generation of Code

    CVE-2022-26112ApacheEPSS 1.64%

    In 0.10.0 or older versions of Apache Pinot, Pinot query endpoint and realtime ingestion layer has a vulnerability in unprotected environments due to a groovy function support. In order to avoid this, we disabled the groovy function support by default from Pin

  • 8.8 High severity

    HPE Integrated Lights-Out 5 (iLO 5): Improper Control of Generation of Code

    CVE-2022-28640HPE Integrated Lights-Out 5 (iLO 5)

    A potential local adjacent arbitrary code execution vulnerability that could potentially lead to a loss of confidentiality, integrity, and availability was discovered in HPE Integrated Lights-Out 5 (iLO 5) in Version: 2.71. Hewlett Packard Enterprise has provi

  • 8.8 High severity

    xwiki-platform: Improper Encoding or Escaping of Output

    CVE-2022-36100XWikiEPSS 73.6%

    XWiki Platform Applications Tag and XWiki Platform Tag UI are tag applications for XWiki, a generic wiki platform. Starting with version 1.7 in XWiki Platform Applications Tag and prior to 13.10.6 and 14.4 in XWiki Platform Tag UI, the tags document `Main.Tags

  • 8.8 High severity

    xwiki-platform: Improper Encoding or Escaping of Output

    CVE-2022-36099XWikiEPSS 76.3%

    XWiki Platform Wiki UI Main Wiki is software for managing subwikis on XWiki Platform, a generic wiki platform. Starting with version 5.3-milestone-2 and prior to versions 13.10.6 and 14.4, it's possible to inject arbitrary wiki syntax including Groovy, Python

  • 7.3 High severity

    poetry: Improper Neutralization of Argument Delimiters in a Command

    CVE-2022-36069Python-poetryEPSS 1.32%

    Poetry is a dependency manager for Python. When handling dependencies that come from a Git repository instead of a registry, Poetry uses various commands, such as `git clone`. These commands are constructed using user input (e.g. the repository URL). When buil

  • 8.8 High severity

    Fortinet FortiSOAR: Improper Control of Generation of Code

    CVE-2022-35847Fortinet

    An improper neutralization of special elements used in a template engine vulnerability [CWE-1336] in FortiSOAR management interface 7.2.0, 7.0.0 through 7.0.3, 6.4.0 through 6.4.4 may allow a remote and authenticated attacker to execute arbitrary code via a cr

  • 7.5 High severity

    Apache OFBiz: Improper Control of Generation of Code

    CVE-2022-25813ApacheEPSS 67.3%

    In Apache OFBiz, versions 18.12.05 and earlier, an attacker acting as an anonymous user of the ecommerce plugin, can insert a malicious content in a message “Subject” field from the "Contact us" page. Then a party manager needs to list the communications in th

  • 7.8 High severity

    mdx-mermaid: Improper Control of Generation of Code

    CVE-2022-36036Sjwall

    mdx-mermaid provides plug and play access to Mermaid in MDX. There is a potential for an arbitrary javascript injection in versions less than 1.3.0 and 2.0.0-rc1. Modify any mermaid code blocks with arbitrary code and it will execute when the component is load

  • 9.8 Critical severity

    Movable Type XMLRPC API: Improper Control of Generation of Code

    CVE-2022-38078Six ApartEPSS 2.14%

    Movable Type XMLRPC API provided by Six Apart Ltd. contains a command injection vulnerability. Sending a specially crafted message by POST method to Movable Type XMLRPC API may allow arbitrary Perl script execution, and an arbitrary OS command may be executed

  • 7.2 High severity

    Transposh WordPress Translation: Improper Control of Generation of Code

    CVE-2022-25812Transposh WordPress TranslationEPSS 1.72%

    The Transposh WordPress Translation WordPress plugin before 1.0.8 does not validate its debug settings, which could allow allowing high privilege users such as admin to perform RCE

  • 9.6 Critical severity

    Portal for ArcGIS: Improper Control of Generation of Code

    CVE-2022-38193Esri

    There is a code injection vulnerability in Esri Portal for ArcGIS versions 10.8.1 and below that may allow a remote, unauthenticated attacker to pass strings which could potentially cause arbitrary code execution.

  • 8.8 High severity

    arvados: Deserialization of Untrusted Data

    CVE-2022-36006ArvadosEPSS 1.73%

    Arvados is an open source platform for managing, processing, and sharing genomic and other large scientific and biomedical data. A remote code execution (RCE) vulnerability in the Arvados Workbench allows authenticated attackers to execute arbitrary code via s

  • 7.8 High severity

    os/exec: Improper Control of Generation of Code

    CVE-2022-30580Go standard library

    Code injection in Cmd.Start in os/exec before Go 1.17.11 and Go 1.18.3 allows execution of any binaries in the working directory named either "..com" or "..exe" by calling Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput when Cmd.Path is unset.

  • 7.2 High severity

    Mealie: Improper Control of Generation of Code

    CVE-2022-34625Mealie ProjectEPSS 2.97%

    Mealie1.0.0beta3 was discovered to contain a Server-Side Template Injection vulnerability, which allows attackers to execute arbitrary code via a crafted Jinja2 template.

  • 7.2 High severity

    Jira Server: Improper Control of Generation of Code

    CVE-2022-36799AtlassianEPSS 46.7%

    This issue exists to document that a security improvement in the way that Jira Server and Data Center use templates has been implemented. Affected versions of Atlassian Jira Server and Data Center allowed remote attackers with system administrator permissions

  • 9.8 Critical severity

    The vulnerability was found in Moodle, occurs due to improper input validation when parsing…

    CVE-2022-35649MoodleEPSS 8.55%

    The vulnerability was found in Moodle, occurs due to improper input validation when parsing PostScript code. An omitted execution parameter results in a remote code execution risk for sites running GhostScript versions older than 9.50. Successful exploitation

  • 9.8 Critical severity

    roxy-wi: Unrestricted Upload of File with Dangerous Type

    CVE-2022-31161Hap-wiEPSS 28.8%

    Roxy-WI is a Web interface for managing HAProxy, Nginx and Keepalived servers. Prior to version 6.1.1.0, the system command can be run remotely via the subprocess_execute function without processing the inputs received from the user in the /app/options.py file

  • 9.8 Critical severity

    RUGGEDCOM RM1224 LTE(4G) EU: Improper Control of Generation of Code

    CVE-2022-34821SiemensEPSS 2.48%

    A vulnerability has been identified in RUGGEDCOM RM1224 LTE(4G) EU (6GK6108-4AM00-2BA2), RUGGEDCOM RM1224 LTE(4G) NAM (6GK6108-4AM00-2DA2), SCALANCE M804PB (6GK5804-0AP00-2AA2), SCALANCE M812-1 ADSL-Router (6GK5812-1AA00-2AA2), SCALANCE M812-1 ADSL-Router (6GK

  • 8.0 High severity

    RUGGEDCOM i800: Improper Control of Generation of Code

    CVE-2022-34663Siemens

    A vulnerability has been identified in RUGGEDCOM i800, RUGGEDCOM i800NC, RUGGEDCOM i801, RUGGEDCOM i801NC, RUGGEDCOM i802, RUGGEDCOM i802NC, RUGGEDCOM i803, RUGGEDCOM i803NC, RUGGEDCOM M2100, RUGGEDCOM M2100F, RUGGEDCOM M2100NC, RUGGEDCOM M2200, RUGGEDCOM M220

  • 9.8 Critical severity

    Member Hero: Improper Control of Generation of Code

    CVE-2022-0885Member HeroEPSS 9.44%

    The Member Hero WordPress plugin through 1.0.9 lacks authorization checks, and does not validate the a request parameter in an AJAX action, allowing unauthenticated users to call arbitrary PHP functions with no arguments.

  • 7.8 High severity

    convert-svg-core: Improper Control of Generation of Code

    CVE-2022-24429Convert-svg-core

    The package convert-svg-core before 0.6.3 are vulnerable to Arbitrary Code Injection when using a specially crafted SVG file. An attacker can read arbitrary files from the file system and then show the file content as a converted PNG file.

  • 9.8 Critical severity

    metacalc: Improper Control of Generation of Code

    CVE-2022-21122MetacalcEPSS 2.68%

    The package metacalc before 0.0.2 are vulnerable to Arbitrary Code Execution when it exposes JavaScript's Math class to the v8 context. As the Math class is exposed to user-land, it can be used to get access to JavaScript's Function constructor.

  • 8.8 High severity

    smarty: Improper Control of Generation of Code

    CVE-2022-29221Smarty-phpEPSS 4.91%

    Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites th

  • 7.8 High severity

    tensorflow: Improper Control of Generation of Code

    CVE-2022-29216TensorFlow

    TensorFlow is an open source platform for machine learning. Prior to versions 2.9.0, 2.8.1, 2.7.2, and 2.6.4, TensorFlow's `saved_model_cli` tool is vulnerable to a code injection. This can be used to open a reverse shell. This code path was maintained for com

  • 9.8 Critical severity

    Ionize: Improper Control of Generation of Code

    CVE-2022-29307IonizecmsEPSS 18.3%

    IonizeCMS v1.0.8.1 was discovered to contain a command injection vulnerability via the function copy_lang_content in application/models/lang_model.php.