High severityPHPFile InclusionHIGH confidence
File Inclusion Interpolated
A request parameter is interpolated or concatenated into an include/require path (CWE-98).
Standards mapping
- OWASP Top 10
- A03:2021 - Injection
- OWASP ASVS
- V12.3.2 (L1)
Vulnerable vs. safe
Flagged by this check
include("pages/" . $_GET['page'] . ".php");Passes - the safe pattern
include("pages/" . basename("home") . ".php");Why it matters & how to fix it
A request parameter is interpolated or concatenated into an include/require path (CWE-98). This is directly exploitable file inclusion. Validate against an allow-list of permitted files and strip path components with basename().
References
Rule ID integsec-php-file-inclusion-interpolated - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentest