- What is CWE-470?
- 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.
- What CVEs are caused by CWE-470?
- 68 recorded CVEs are attributed to CWE-470, including CVE-2025-34393, CVE-2026-55107, CVE-2026-13772.
- How do you prevent CWE-470?
- Refactor your code to avoid using reflection.
- How is CWE-470 detected?
- 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.)
- What are the consequences of CWE-470?
- Exploiting CWE-470 can lead to: Execute Unauthorized Code or Commands, Alter Execution Logic, DoS: Crash, Exit, or Restart, Other, Read Application Data.
- Is CWE-470 actively exploited?
- 68 recorded CVEs are caused by CWE-470; none are currently in CISA's KEV catalog of actively exploited flaws.