CWE-470: Use of Externally-Controlled Input to Select Classes or Code
128 CVEs have CWE-470 as their primary weakness. 1 of them are in the CISA KEV catalog. The highest EPSS score among them is 80.097%.
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.
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.
Child of CWE-913: Improper Control of Dynamically-Managed Code Resources
Mitigations
- Architecture and Design: Refactor your code to avoid using reflection.
- Architecture and Design: Do not use user-controlled inputs to select and load classes or code.
- Implementation: Apply strict input validation by using allowlists or indirect selection to ensure that the user is only selecting allowable classes or code.
Observed examples
- CVE-2018-1000613: Cryptography API uses unsafe reflection when deserializing a private key
- CVE-2004-2331: Database system allows attackers to bypass sandbox restrictions by using the Reflection API.
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2026-82078 | 2026-08-28 | CRITICAL | 9.1 | 63.047% | An unsafe dynamic class loading vulnerability exists in the database connection utilities of PaperCut MF and PaperCut NG. The application instantiates database… |
| CVE-2026-91115 | 2026-11-16 | HIGH | 8.8 | not scored | Silverstripe Framework is a PHP framework which powers the Silverstripe CMS. From 6.0.0 until 6.2.13, the writer option of i18nTextCollectorTask is passed to… |
| CVE-2026-104692 | 2026-11-16 | HIGH | 8.5 | not scored | LibreOffice bundles the HSQLDB database engine, which can be used through the generic JDBC database driver as well as through the support for embedded… |
| CVE-2026-101892 | 2026-11-16 | HIGH | 8.5 | not scored | LibreOffice documents in ODF format can contain form controls, such as buttons and text fields, and each control names the component that implements it. The… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-470'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-470'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).