CVE-2026-50547: Php Dynamic Php File Inclusion Unvalidated Identifier

A PHP script is included/required through a path concatenated around a variable identifier (base-dir . identifier . '.php') without validating that identifier against an anchored allowlist. If the identifier can contain '/', '\', '..' or other path metacharacters, an attacker can traverse out of the intended directory and include any existing local .php file

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0PHP
greprules fetch cve-2026-50547-php-dynamic-php-file-inclusion-unvalidated-identifier --engine opengrep

Description

A PHP script is included/required through a path concatenated around a variable identifier (base-dir . identifier . '.php') without validating that identifier against an anchored allowlist. If the identifier can contain '/', '\', '..' or other path metacharacters, an attacker can traverse out of the intended directory and include any existing local .php file