Skip to content
OpenAdvisories

Weakness (CWE)

CWE-470: Use of Externally-Controlled Input to Select Classes or Code

Base Draft

The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.

More detail

An attacker could supply values to select unexpected classes or methods. If this occurs, then the attacker could create control flow paths that were not intended by the developer. These paths could bypass authentication or access control checks, or otherwise cause the product to behave in an unexpected manner. This situation becomes a doomsday scenario if the attacker can upload files into a location that appears on the product's classpath (CWE-427) or add new entries to the product's classpath (CWE-426). Under either of these conditions, the attacker can use reflection to introduce new, malicious behavior into the product.

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

    Refactor your code to avoid using reflection.

  2. Architecture and Design

    Do not use user-controlled inputs to select and load classes or code.

  3. Implementation

    Apply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.

Source: MITRE CWE-470

78 results · Clear filters · Feed

  • High 7.5

    Apache OFBiz: Content renderer runs a service name stored on the row

    Improper Authorization in ContentWorker in Apache OFBiz 24.09 before 24.09.08 on all platforms allows a remote unauthenticated attacker to trigger arbitrary OFBiz service invocation with attacker-controlled parameters, resulting in arbitrary file write, arbit…

  • High 8.1

    Remote Code Execution via Unsafe Class Loading in Amazon Redshift JDBC Driver Connection Parameters

    Unsafe reflection in the connection parameter and credentials profile handling of Amazon Redshift JDBC Driver before 2.3.0 might allow an actor who can influence the JDBC connection URL or the AWS credentials profile to execute arbitrary code in the applicati…

  • High 7.8

    MONAI 1.6.0 before 1.6.1 Code Execution via Auto3DSeg algo_from_json()

    MONAI from 1.6.0 before 1.6.1 contains a remote code execution vulnerability in Auto3DSeg algo_from_json() that allows attackers to run Python code via a crafted work directory's algo_object.json. Attackers can ship a malicious algorithm_templates module plus…

  • High 8.1
    CVE-2026-108097 Public exploit

    Drupal core - Critical - Remote code execution - SA-CORE-2026-014

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Drupal Drupal core allows Reflection Injection. This issue affects Drupal core versions: from 8.9.0 to 10.6.19, from 11.0.0 to 11.3.19, from 11.4.0 to 11.4.10,…

  • High 8.1

    Entity List - Critical - Remote code execution - SA-CONTRIB-2026-218

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Drupal Entity List allows Reflection Injection. This issue affects Entity List versions: from 0.0.0 to 3.0.10.

  • High 8.1

    Agno through 3.1.11 Code Execution via PandasTools Unsafe Reflection

    Agno through 3.1.11 contains an unsafe reflection vulnerability in PandasTools that allows attackers to invoke arbitrary pandas functions by supplying model-controlled function names to getattr(). Attackers can use prompt injection to make the agent call pand…

  • High 7.6

    WordPress Royal Elementor Addons plugin <= 1.7.1068 - Arbitrary Code Execution vulnerability

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in WProyal Royal Elementor Addons royal-elementor-addons allows Code Injection.This issue affects Royal Elementor Addons: from n/a through 1.7.1068.

  • High 8.8

    CrewAI crewAI Framework Agent Loading Unsafe Reflection Remote Code Execution Vulnerability

    CrewAI crewAI Framework Agent Loading Unsafe Reflection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of CrewAI crewAI. User interaction is required to exploit this vulnerab…

  • High 7.3

    speaches-ai speaches Pyannote Diarization Model Loading pyannote_diarization.py PyannoteDiarizationModelManager._load_fn externally-controlled input to select classes or code

    A security vulnerability has been detected in speaches-ai speaches up to 0.9.0-rc.3. This vulnerability affects the function PyannoteDiarizationModelManager._load_fn of the file src/speaches/executors/pyannote_diarization.py of the component Pyannote Diarizat…

  • High 7.0

    JDBC LogFactory 任意类加载/构造导致潜在 RCE

    在 openGauss-connector-jdbc 的 pgjdbc/src/main/java/org/postgresql/log/LogFactory.java 中,LogFactory 根据 JDBC 连接参数中的 logger 类名调用 Class.forName 加载类后,直接反射调用以 String 为参数的构造函数,再转换为 Log。缺少 asSubclass(Log.class) 校验,非 Log 实现类也会在类型检查前被实例化。因此,当攻击者可控制 JDBC URL 或连接属性中的 logg…

  • High 8.5

    TuxGuitar: Arbitrary Code Execution via maliciously crafted `.tg` file

    TuxGuitar is an open-source guitar tablature editor. Prior to 2.1.0, an untrusted .tg file can set gervil.soundbank.path to reference an on-disk archive, including the .tg file itself, whose META-INF/services/javax.sound.midi.Soundbank entry names an attacker…

  • High 8.8

    Grid Protection Alliance openPDC and openHistorian Use of Externally-Controlled Input to Select Classes or Code

    A component loading mechanism in openPDC and openHistorian will construct and run any specified type, which may be an invalid component to load. An attacker with an authenticated user account and the ability to place a file on the host filesystem can use this…

  • High 7.7

    Backstage: Remote code execution via crafted markdown_extensions in TechDocs mkdocs.yml

    Backstage is an open framework for building developer portals. Prior to 1.14.6, the @backstage/plugin-techdocs-node package is affected by remote code execution via crafted markdown_extensions in techdocs mkdocs.yml. An authenticated user who can register cat…

  • High 7.8

    Hydra: Optuna custom_search_space can resolve and execute untrusted callables via get_method

    Hydra is a framework for elegantly configuring complex applications. From 1.2.0 until 1.3.0 and 1.4.0.dev10, the hydra-optuna-sweeper package accepts a configuration-controlled dotted path in hydra.sweeper.custom_search_space, resolves it with hydra.utils.get…

  • High 8.5

    Hydra: Mutable instantiate policy sets allow target blocklist bypass

    Hydra is a framework for elegantly configuring complex applications. From 1.3.4 until 1.3.7 and 1.4.0.dev10, Hydra stores legacy instantiate target blocklists and related execution-policy collections in mutable module-level state. An attacker who controls mul…

  • High 7.5

    Scrapy: Arbitrary Module Import via Referrer-Policy Header in RefererMiddleware

    Scrapy is a high-level web crawling and scraping framework for Python. From 1.4.0 until 2.14.2, RefererMiddleware in scrapy/spidermiddlewares/referer.py treated a Referrer-Policy response-header value that resembled a Python import path as a referrer policy c…

  • High 7.2

    Kiteworks Email Protection Gateway unsafe reflection

    Kiteworks Email Protection Gateway before version 9.5.0 is vulnerable to Unsafe Reflection and does not sufficiently restrict the code that the mail-processing pipeline could load from an imported rule configuration. An authenticated administrator with mail-r…

  • High 7.8

    GluonTS arbitrary command execution during model deserialization

    Deserialization of untrusted data in the model loading component in Amazon GluonTS before 0.17.0 might allow context-dependent attackers to execute arbitrary operating system commands with the privileges of the loading process via a crafted serialized model d…

  • High 8.2

    Artemis-core-client: unsafe reflection in apache activemq artemis federation message deserialization

    Apache ActiveMQ Artemis before 2.34.0 contains an unsafe reflection vulnerability in FederationStreamConnectMessage.getFederationPolicy(). The method calls Class.forName(clazz).getConstructor().newInstance() where clazz is read directly from the CORE protocol…

  • High 7.6

    IBM Financial Transaction Manager (FTM) is Impacted by Multiple Vulnerabilities

    IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow a remote attacker to cause a denial of service due to the improper use of reflection with externally controlled input.

  • High 8.8

    Apache Calcite Avatica: Unrestricted class initialization when instantiating plugins

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache Calcite Avatica. Plugin instantiation (via AvaticaUtils#instantiatePlugin and other methods) initializes arbitrary classes via unrestricted calls to Cla…

  • High 7.5

    IBM MQ queue manager is vulnerable to remote code execution

    IBM MQ could allow an authenticated attacker with cluster access to cause a denial of service or potentially execute arbitrary code due to improper validation of cluster command message lengths.

  • High 7.3
  • High 8.8

    djust has an unauthenticated arbitrary module import via the WebSocket/SSE view-mount path

    djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to version 1.0.7, the djust live transport resolves the LiveView to mount from a client-supplied dotted path by calling `__import__(module_pat…

  • High 8.4

    RestrictedPython: Sandbox escape via string.Formatter field resolution

    RestrictedPython is a tool that helps define a subset of the Python language for accepting program input in a trusted environment. Prior to 8.4, RestrictedPython could allow a sandbox escape when a custom import policy or globals exposed the standard library …

  • High 8.8

    Apache Airflow Apache Kafka provider: Connection-editor remote code execution on the Scheduler via Kafka connection callback configuration

    Apache Airflow Apache Kafka provider versions 1.15.0 before 2.0.0 resolve dotted-path strings found in a Kafka connection's `extra` field into Python callables via `import_string`, with no allowlist, and hand them to the confluent-kafka client which invokes t…

  • High 8.8
    CVE-2026-79987 Public exploit

    Low-privilege RCE through element-search eager loading

    A remote, authenticated, non-admin Craft CMS Control Panel user with only the accessCp permission can execute operating system commands as the PHP web worker.

  • High 8.8

    Apache Nutch: Unauthenticated remote code execution (RCE) via JEXL injection in Nutch Server (Nutch REST API)

    Missing Authorization, Improper Control of Generation of Code ('Code Injection'), Improper Control of Dynamically-Managed Code Resources, Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache Nutch Server (…

  • High 8.8

    Vocos through 0.1.0 Arbitrary Code Execution via Unrestricted class_path in Model Configuration

    Vocos instantiates a class named by a configuration file without restricting which class may be named. instantiate_class in vocos/pretrained.py takes the class_path value from the configuration, splits it into a module and an attribute, imports the module wit…

  • High 7.8

    Hydra: hydra.utils.instantiate with untrusted config can lead to code execution

    Hydra is a framework for elegantly configuring complex applications. Prior to 1.3.4, hydra.utils.instantiate() resolves and calls Python objects selected by configuration through _resolve_target() in hydra/_internal/instantiate/_instantiate2.py, allowing atta…

  • High 7.5

    RabbitMQ Java client: Unvalidated Class.forName in JSON-RPC ProcedureDescription enables arbitrary class loading

    The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.0, com.rabbitmq.tools.jsonrpc.ProcedureDescription receives a javaReturnType value in an untrusted system.describe response a…

  • High 7.2

    Nexus Repository - Arbitrary Class Instantiation via Unsafe Realm Configuration

    An account holding the nexus:settings:update permission in Nexus Repository 3 (or the equivalent nexus:settings permission in the legacy Nexus Repository 2) could submit arbitrary values as realm identifiers through an internal configuration API that did not …

  • High 8.1

    Multiple Vulnerabilities in IBM® Java SDK affect IBM WebSphere Application Server and WebSphere Application Server Liberty due to the July 2026 CPU

    IBM WebSphere Application Server 8.5, and 9.0 and IBM WebSphere Application Server - Liberty Continuous delivery has a flaw in the ORB component in IBM SDK, Java Technology Edition, may allow a malicious IIOP server to induce loading and instantation of arbit…

  • High 7.2

    ShopLentor <= 3.3.7 - Authenticated (Administrator+) Arbitrary Function Execution via 'callback' Parameter via REST API

    The ShopLentor plugin for WordPress is vulnerable to arbitrary function execution via the woolentoropt/v1/custom-action REST API endpoint in all versions up to, and including, 3.3.7. This is due to the handle_action() method passing user-supplied input direct…

  • High 8.1

    Grav CMS 2.0.7 through 2.0.10 Arbitrary Method Invocation via Blueprint

    Grav CMS versions 2.0.7 through 2.0.10 fail to validate fully-qualified static method calls (Class::method) in blueprint dynamic-field directives because Blueprint::isSafeDynamicCall() only applies its dangerous-callable denylist to strings that do not contai…

  • High 7.5

    Banks: Unsafe importlib.import_module of attacker-controlled Tool.import_path in CompletionExtension allows RCE

    Banks generates meaningful LLM prompts using a simple template language. In versions prior to 2.4.3, banks parses Tool JSON objects from the rendered body of {% completion %} blocks and later resolves their import_path field through importlib.import_module(..…

  • High 8.8

    Grav before 2.0.9 Remote Code Execution via FlexDirectory

    Grav versions >= 1.7.0 and before 2.0.9 contain a remote code execution vulnerability. FlexDirectory::dynamicDataField() resolves blueprint data-*@: directives by calling call_user_func_array() on attacker-influenced input, validating only that the target is …

  • High 8.1

    DialogHandler Provider Type Tampering Vulnerability in Telerik UI for ASP.NET AJAX

    In Progress® Telerik® UI for AJAX prior to v2026.2.708, DialogHandler provider type input may be tampered with, potentially altering dialog processing and enabling chained exploitation.

  • High 8.1
    CVE-2026-13181 Public exploit

    RadAsyncUpload AsyncUploadTypeName Type Resolution Vulnerability in Telerik UI for ASP.NET AJAX

    In Progress® Telerik® UI for AJAX prior to v2026.2.708, forged upload metadata can influence AsyncUploadTypeName processing and trigger unsafe attacker-controlled type resolution, enabling remote code execution in affected deployments.

  • High 8.7

    Kirby: Arbitrary Method Call via REST API search and collection query endpoints

    Kirby is an open-source content management system. Prior to 4.9.1 and 5.4.1, Kirby did not validate the model attributes that were used in its collection queries, allowing attackers to include arbitrary model methods in their queries. This includes methods wi…