CVE-2025-5257: Php Recursive Pass By Value Array Mutation

A function iterates over an array by value, but passes that value to a recursive call expecting an array by reference. This means recursive modifications only affect the local copy of the loop element, bypass the intended array structure mutation, and can lead to security bypasses such as insufficient sanitization (e.g. SQL injection) when deep nesting is us

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0PHPβ
greprules fetch cve-2025-5257-php-recursive-pass-by-value-array-mutation --engine opengrep

Description

A function iterates over an array by value, but passes that value to a recursive call expecting an array by reference. This means recursive modifications only affect the local copy of the loop element, bypass the intended array structure mutation, and can lead to security bypasses such as insufficient sanitization (e.g. SQL injection) when deep nesting is us