CVE-2022-25777: Php Foreach Pass By Value Sanitization Bypass
A temporary loop variable from a pass-by-value 'foreach' array is passed to a sanitization or mutation method. In PHP, 'foreach' iterates by value unless specifically passed by reference, so mutating a property of the loop variable (`$VAL[$PROP]`) only modifies a temporary copy. This allows unvalidated or unsanitized payloads to remain in the original array,
greprules fetch cve-2022-25777-php-foreach-pass-by-value-sanitization-bypass --engine opengrepDescription
A temporary loop variable from a pass-by-value 'foreach' array is passed to a sanitization or mutation method. In PHP, 'foreach' iterates by value unless specifically passed by reference, so mutating a property of the loop variable (`$VAL[$PROP]`) only modifies a temporary copy. This allows unvalidated or unsanitized payloads to remain in the original array,
Community feedback
0 signals from signed-in users.
- Useful
- 0
- False positive
- 0
- Metadata
- 0