CWE · MITRE source
CWE-470Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
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.
Last updated: 09 May 2026 03:25 UTC
NIST 800-53 r5 controls that address this weakness (1)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
SC-44 | Detonation Chambers | SC | Externally controlled class or code selection can be resolved and invoked inside the chamber, surfacing unsafe reflection without system impact. |
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2021-21985 KEV | 9.6 | 9.8 | 0.9441 | 2021-05-26 |
CVE-2022-41853 | 5.8 | 8.0 | 0.7014 | 2022-10-06 |
CVE-2024-0200 | 5.7 | 7.2 | 0.7079 | 2024-01-16 |
CVE-2022-30287 | 2.5 | 8.0 | 0.1553 | 2022-07-28 |
CVE-2018-1000613 | 2.3 | 9.8 | 0.0504 | 2018-07-09 |
CVE-2021-31522 | 2.2 | 9.8 | 0.0340 | 2022-01-06 |
CVE-2023-6943 | 2.2 | 9.8 | 0.0397 | 2024-01-30 |
CVE-2018-5511 | 2.1 | 7.2 | 0.1165 | 2018-04-13 |
CVE-2019-1003040 | 2.1 | 9.8 | 0.0180 | 2019-03-28 |
CVE-2019-1003041 | 2.1 | 9.8 | 0.0180 | 2019-03-28 |
CVE-2023-34102 | 2.1 | 8.3 | 0.0771 | 2023-06-05 |
CVE-2023-33652 | 2.0 | 8.8 | 0.0366 | 2023-06-06 |
CVE-2025-53693 | 2.0 | 9.8 | 0.0042 | 2025-09-03 |
CVE-2025-34393 | 2.0 | 9.8 | 0.0052 | 2025-12-10 |
CVE-2026-42027 | 2.0 | 9.8 | 0.0036 | 2026-05-04 |
CVE-2023-32217 | 1.9 | 9.0 | 0.0084 | 2023-06-05 |
CVE-2024-8015 | 1.9 | 9.1 | 0.0053 | 2024-10-09 |
CVE-2025-63690 | 1.9 | 9.1 | 0.0172 | 2025-11-07 |
CVE-2019-10174 | 1.8 | 8.8 | 0.0088 | 2019-11-25 |
CVE-2021-32647 | 1.8 | 8.0 | 0.0343 | 2021-06-01 |
CVE-2024-28121 | 1.8 | 8.8 | 0.0146 | 2024-03-12 |
CVE-2024-6096 | 1.8 | 8.8 | 0.0046 | 2024-07-24 |
CVE-2024-8014 | 1.8 | 8.8 | 0.0074 | 2024-10-09 |
CVE-2024-4990 | 1.8 | 9.1 | 0.0015 | 2025-03-20 |
CVE-2024-53850 | 1.7 | 8.2 | 0.0020 | 2024-12-26 |