CVE-2025-9824: Php Recursive Array Mutation By Value

A by-value loop variable is passed to a recursive function that expects an array by reference. Because the loop variable is a local copy of the array element, modifying it by reference in the recursive call does not mutate the original array. This can bypass nested sanitization routines or cause incomplete updates. Iterate using reference `&$val` or use `$ar

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

Description

A by-value loop variable is passed to a recursive function that expects an array by reference. Because the loop variable is a local copy of the array element, modifying it by reference in the recursive call does not mutate the original array. This can bypass nested sanitization routines or cause incomplete updates. Iterate using reference `&$val` or use `$ar