VariantDraft
CWE-98Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')
Category: other
Description
The PHP application receives input from an upstream component, but it does not restrict or incorrectly restricts the input before its usage in "require," "include," or similar functions.
In certain versions and configurations of PHP, this can allow an attacker to specify a URL to a remote location from which the product will obtain the code to execute. In other cases in association with path traversal, the attacker can specify a local file that may contain executable statements that can be parsed by PHP.
Common consequences· 1
- Integrity / Confidentiality / Availability — Execute Unauthorized Code or CommandsThe attacker may be able to specify arbitrary code to be executed from a remote location. Alternatively, it may be possible to use normal program behavior to insert php code into files on the local machine which can then be included and force the code to execute since php ignores everything in the file except for the content between php specifiers.
Potential mitigations· 5
- [Architecture and Design]Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- [Architecture and Design]
- [Architecture and Design]For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- [Architecture and Design, Operation]
- [Architecture and Design, Operation]Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Related CAPEC attack patterns· 1
References
Exploits (incoming)1
| Type | Target | Confidence | Tier |
|---|---|---|---|
| AttackPattern | PHP Remote File Inclusioncapec-193 | 100% | live |
(incoming)149
| Type | Target | Confidence | Tier |
|---|---|---|---|
| Vulnerability | CVE-2025-0366cve-2025-0366 | 0% | live |
| Vulnerability | CVE-2025-0682cve-2025-0682 | 0% | live |
| Vulnerability | CVE-2025-11023cve-2025-11023 | 0% | live |
| Vulnerability | CVE-2025-11920cve-2025-11920 | 0% | live |
| Vulnerability | CVE-2025-12497cve-2025-12497 | 0% | live |
| Vulnerability | CVE-2025-12549cve-2025-12549 | 0% | live |
| Vulnerability | CVE-2025-12550cve-2025-12550 | 0% | live |
| Vulnerability | CVE-2025-12851cve-2025-12851 | 0% | live |
| Vulnerability | CVE-2025-13088cve-2025-13088 | 0% | live |
| Vulnerability | CVE-2025-13641cve-2025-13641 | 0% | live |
| Vulnerability | CVE-2025-14359cve-2025-14359 | 0% | live |
| Vulnerability | CVE-2025-14429cve-2025-14429 | 0% | live |
| Vulnerability | CVE-2025-14430cve-2025-14430 | 0% | live |
| Vulnerability | CVE-2025-14431cve-2025-14431 | 0% | live |
| Vulnerability | CVE-2025-14475cve-2025-14475 | 0% | live |
| Vulnerability | CVE-2025-14502cve-2025-14502 | 0% | live |
| Vulnerability | CVE-2025-15368cve-2025-15368 | 0% | live |
| Vulnerability | CVE-2025-1707cve-2025-1707 | 0% | live |
| Vulnerability | CVE-2025-1771cve-2025-1771 | 0% | live |
| Vulnerability | CVE-2025-2101cve-2025-2101 | 0% | live |
| Vulnerability | CVE-2025-22508cve-2025-22508 | 0% | live |
| Vulnerability | CVE-2025-22509cve-2025-22509 | 0% | live |
| Vulnerability | CVE-2025-22656cve-2025-22656 | 0% | live |
| Vulnerability | CVE-2025-22707cve-2025-22707 | 0% | live |
| Vulnerability | CVE-2025-22708cve-2025-22708 | 0% | live |
| Vulnerability | CVE-2025-22712cve-2025-22712 | 0% | live |
| Vulnerability | CVE-2025-23937cve-2025-23937 | 0% | live |
| Vulnerability | CVE-2025-23948cve-2025-23948 | 0% | live |
| Vulnerability | CVE-2025-23949cve-2025-23949 | 0% | live |
| Vulnerability | CVE-2025-23952cve-2025-23952 | 0% | live |
Showing top 30 of 149 by confidence. Click any target to see the full neighbourhood.
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.