---
title: "WEB-PHP-003 PHP Allows Remote File Inclusion"
canonical: https://openvapt.com/checks/WEB-PHP-003.html
html: https://openvapt.com/checks/WEB-PHP-003.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# WEB-PHP-003 PHP Allows Remote File Inclusion

Checks whether include() and require() may load code from URLs.

- Domain: Web Apps
- Severity: High
- Control category: Secure Configuration
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CIS Controls v8: 16.7
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-98
- OWASP Top 10 2021: A03:2021, A05:2021
- OWASP ASVS 4.0.3: 12.3.3
- NIST SP 800-53 Rev. 5: CM-6, CM-7

## Why It Matters

With allow_url_include on, a single file-inclusion bug lets an attacker run their own PHP code from their own server (remote file inclusion).

## How It Detects

Asks the PHP command-line binary for ini_get('allow_url_include') (the only PHP code OpenVAPT may run). Web PHP-FPM pools can use a different php.ini; verify those too.

## How to Fix

In php.ini set  allow_url_include = Off  (the default since PHP 5.2) and restart PHP.

## How to Verify

```
php -r "echo ini_get('allow_url_include');"  and check the FPM pool's php.ini or php_admin_value settings.
```

## Learn the Theory

- [P6 Information Exposure and Misconfiguration](https://openvapt.com/academy/p6.md)

## References

- [PHP manual, php.ini directives](https://www.php.net/manual/en/ini.list.php)
- [OWASP PHP Configuration Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/PHP_Configuration_Cheat_Sheet.html)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/web/php.go

Run it: `openvapt scan --only WEB-PHP-003`. Read it offline: `openvapt explain WEB-PHP-003`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/WEB-PHP-003.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
