CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
low-riskThe 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.
Abstraction: Base
Common Consequences
Integrity
→
Execute Unauthorized Code or Commands
Availability
→
DoS: Crash, Exit, or Restart
Confidentiality
→
Read Application Data
Detection Methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Real-World Examples (10)
| CVE | CVSS | EPSS | KEV |
|---|---|---|---|
| CVE-2021-21985 | 9.8 | 94.4% | Y |
| CVE-2024-0200 | 7.2 | 70.8% | — |
| CVE-2024-0200 | 7.2 | 70.8% | — |
| CVE-2022-41853 | 8.0 | 70.1% | — |
| CVE-2022-30287 | 8.0 | 15.5% | — |
| CVE-2018-5511 | 7.2 | 11.7% | — |
| CVE-2023-34102 | 8.3 | 7.7% | — |
| CVE-2018-1000613 | 9.8 | 5.0% | — |
| CVE-2023-6943 | 9.8 | 4.0% | — |
| CVE-2023-33652 | 8.8 | 3.7% | — |
10
/ 100
low-risk
Active Threat
9/50 · Minimal
Exploit Availability
1/50 · Minimal