Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-470 (使用外部可控制的输入来选择类或代码(不安全的反射)) — Vulnerability Class 55

55 vulnerabilities classified as CWE-470 (使用外部可控制的输入来选择类或代码(不安全的反射)). AI Chinese analysis included.

CWE-470 represents a critical input validation weakness where applications utilize reflection to dynamically select classes or methods based on externally controlled data without adequate safeguards. Attackers typically exploit this vulnerability by injecting malicious payloads that reference unintended or dangerous classes, potentially leading to remote code execution, denial of service, or unauthorized access to sensitive system resources. This occurs because the application blindly trusts user-supplied strings to determine program flow, bypassing standard security controls. To mitigate this risk, developers must implement strict allow-listing mechanisms that restrict reflection to a predefined set of safe, expected classes. Additionally, input sanitization and rigorous validation should be applied to ensure that only authorized identifiers are processed, effectively neutralizing the threat of arbitrary code execution through unsafe reflection.

MITRE CWE Description
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. If the product uses external inputs to determine which class to instantiate or which method to invoke, then 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.
Common Consequences (3)
Integrity, Confidentiality, Availability, OtherExecute Unauthorized Code or Commands, Alter Execution Logic
The attacker might be able to execute code that is not directly accessible to the attacker. Alternately, the attacker could call unexpected code in the wrong place or the wrong time, possibly modifying critical system state.
Availability, OtherDoS: Crash, Exit, or Restart, Other
The attacker might be able to use reflection to call the wrong code, possibly with unexpected arguments that violate the API (CWE-227). This could cause the product to exit or hang.
ConfidentialityRead Application Data
By causing the wrong code to be invoked, the attacker might be able to trigger a runtime error that leaks sensitive information in the error message, such as CWE-536.
Mitigations (3)
Architecture and DesignRefactor your code to avoid using reflection.
Architecture and DesignDo not use user-controlled inputs to select and load classes or code.
ImplementationApply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.
Examples (1)
A common reason that programmers use the reflection API is to implement their own command dispatcher. The following example shows a command dispatcher that does not use reflection:
String ctl = request.getParameter("ctl"); Worker ao = null; if (ctl.equals("Add")) { ao = new AddCommand(); } else if (ctl.equals("Modify")) { ao = new ModifyCommand(); } else { throw new UnknownActionError(); } ao.doAction(request);
Good · Java
String ctl = request.getParameter("ctl"); Class cmdClass = Class.forName(ctl + "Command"); Worker ao = (Worker) cmdClass.newInstance(); ao.doAction(request);
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2026-17593 Nexus Repository - Arbitrary Class Instantiation via Unsafe Realm Configuration — Nexus Repository 7.2 High2026-08-07
CVE-2026-64663 Statamic: Unsafe method invocation via Antlers template resolution allows data destruction — cms 6.5 Medium2026-08-06
CVE-2026-8400 Multiple Vulnerabilities in IBM® Java SDK affect IBM WebSphere Application Server and WebSphere Application Server Liberty due to the July 2026 CPU — WebSphere Application Server 8.1 High2026-08-05
CVE-2026-6020 ShopLentor <= 3.3.7 - Authenticated (Administrator+) Arbitrary Function Execution via 'callback' Parameter via REST API — ShopLentor – All-in-One WooCommerce Growth & Store Enhancement Plugin 7.2 High2026-08-05
CVE-2026-53666 React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration — react-router 6.1 Medium2026-07-27
CVE-2026-63317 Apache OpenNLP: Arbitrary Class Instantiation in GeneratorFactory via Feature Descriptor XML — Apache OpenNLP--2026-07-24
CVE-2026-65608 Grav before 2.0.9 Remote Code Execution via FlexDirectory — grav 8.8 High2026-07-23
CVE-2026-13187 DialogHandler Provider Type Tampering Vulnerability in Telerik UI for ASP.NET AJAX — Telerik UI for ASP.NET AJAX 8.1 High2026-07-22
CVE-2026-13181 RadAsyncUpload AsyncUploadTypeName Type Resolution Vulnerability in Telerik UI for ASP.NET AJAX — Telerik UI for ASP.NET AJAX 8.1 High2026-07-22
CVE-2026-44174 Kirby: Arbitrary Method Call via REST API search and collection query endpoints — kirby--2026-07-16
CVE-2026-58659 PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter — pytorch-lightning 7.8 High2026-07-15
CVE-2026-44795 Spinnaker: Non-safe yaml deserialization allowing RCE when using specific types — spinnaker 8.8 High2026-07-10
CVE-2026-40008 Apache IoTDB: Arbitrary Class Instantiation via Pipe Transfer RPC — Apache IoTDB--2026-07-10
CVE-2026-24246 NVIDIA Megatron Bridge 代码注入漏洞 — Megatron-Bridge 7.8 High2026-07-01
CVE-2026-13772 IBM WebSphere eXtreme Scale's OQL is affected by remote code execution — WebSphere Extreme Scale 7.5 High2026-06-30
CVE-2026-48517 MessagePack-CSharp: Typeless deserialization type restrictions do not recurse into arrays or generic arguments — MessagePack-CSharp--2026-06-22
CVE-2026-49287 Statamic CMS vulnerable to unsafe method invocation via collection sorting allows data destruction — cms 7.4 High2026-06-19
CVE-2026-48817 Starlette: Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr` — starlette 5.3 Medium2026-06-17
CVE-2026-46718 Apache Calcite: A user-controled model can load arbitrary classes, leading to code execution — Apache Calcite--2026-06-02
CVE-2026-34216 CtrlPanel: Authenticated Remote Code Execution via Dynamic Class Instantiation in SettingsController.php — panel 6.6 Medium2026-05-19
CVE-2026-8178 Remote Code Execution via Unsafe Class Loading in Amazon Redshift JDBC Driver — Amazon Redshift JDBC Driver 8.1 High2026-05-08
CVE-2026-44339 PraisonAI has unsafe tool resolution in `ToolExecutionMixin.execute_tool`: undeclared `__main__` callables execute — PraisonAI 8.6 High2026-05-08
CVE-2026-42027 Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader — Apache OpenNLP 9.8 -2026-05-04
CVE-2026-41175 Statamic: Unsafe method invocation via query value resolution allows data destruction — cms 8.1 High2026-04-22
CVE-2018-25239 Smart VPN 1.1.3.0 Denial of Service via Search — Smart VPN 6.2 Medium2026-04-04
CVE-2026-23923 Unauthenticated arbitrary PHP class instantiation — Zabbix 9.8 -2026-03-24
CVE-2026-33157 Craft CMS: Potential authenticated Remote Code Execution via malicious attached Behavior — cms 8.8 -2026-03-24
CVE-2026-32264 Craft CMS vulnerable to behavior injection RCE ElementIndexesController and FieldsController — cms 7.2AIHighAI2026-03-16
CVE-2026-32263 Craft CMS vulnerable to behavior injection RCE via EntryTypesController — cms 9.1AICriticalAI2026-03-16
CVE-2026-25498 Craft has a potential authenticated Remote Code Execution via malicious attached Behavior — cms 7.2AIHighAI2026-02-09

Vulnerabilities classified as CWE-470 (使用外部可控制的输入来选择类或代码(不安全的反射)) represent 55 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.