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 Commands
    The 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

CAPEC-193

References

  1. https://cwe.mitre.org/data/definitions/98.html

Exploits (incoming)1

TypeTargetConfidenceTier
AttackPatternPHP Remote File Inclusioncapec-193100%live

(incoming)149

TypeTargetConfidenceTier
VulnerabilityCVE-2025-0366cve-2025-03660%live
VulnerabilityCVE-2025-0682cve-2025-06820%live
VulnerabilityCVE-2025-11023cve-2025-110230%live
VulnerabilityCVE-2025-11920cve-2025-119200%live
VulnerabilityCVE-2025-12497cve-2025-124970%live
VulnerabilityCVE-2025-12549cve-2025-125490%live
VulnerabilityCVE-2025-12550cve-2025-125500%live
VulnerabilityCVE-2025-12851cve-2025-128510%live
VulnerabilityCVE-2025-13088cve-2025-130880%live
VulnerabilityCVE-2025-13641cve-2025-136410%live
VulnerabilityCVE-2025-14359cve-2025-143590%live
VulnerabilityCVE-2025-14429cve-2025-144290%live
VulnerabilityCVE-2025-14430cve-2025-144300%live
VulnerabilityCVE-2025-14431cve-2025-144310%live
VulnerabilityCVE-2025-14475cve-2025-144750%live
VulnerabilityCVE-2025-14502cve-2025-145020%live
VulnerabilityCVE-2025-15368cve-2025-153680%live
VulnerabilityCVE-2025-1707cve-2025-17070%live
VulnerabilityCVE-2025-1771cve-2025-17710%live
VulnerabilityCVE-2025-2101cve-2025-21010%live
VulnerabilityCVE-2025-22508cve-2025-225080%live
VulnerabilityCVE-2025-22509cve-2025-225090%live
VulnerabilityCVE-2025-22656cve-2025-226560%live
VulnerabilityCVE-2025-22707cve-2025-227070%live
VulnerabilityCVE-2025-22708cve-2025-227080%live
VulnerabilityCVE-2025-22712cve-2025-227120%live
VulnerabilityCVE-2025-23937cve-2025-239370%live
VulnerabilityCVE-2025-23948cve-2025-239480%live
VulnerabilityCVE-2025-23949cve-2025-239490%live
VulnerabilityCVE-2025-23952cve-2025-239520%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.

CAPEC
PHP Remote File Inclusion
CAPEC
PHP Local File Inclusion
CWE
Inclusion of Sensitive Information in an Include File
CVE
CVE-2026-28032
CWE
PHP External Variable Modification
CVE
CVE-2025-32304
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.