- What is CWE-427?
- The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
- What CVEs are caused by CWE-427?
- 1,166 recorded CVEs are attributed to CWE-427, including CVE-2020-3433, CVE-2020-3153, CVE-2026-65093. 2 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- How do you prevent CWE-427?
- Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
- How is CWE-427 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-427?
- Exploiting CWE-427 can lead to: Execute Unauthorized Code or Commands.
- Is CWE-427 actively exploited?
- Yes. 2 CWE-427 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 1,166 recorded CVEs.