
Step-by-step analysis and exploitation lab for Drupal CVE-2018-7600 remote code execution vulnerability, including debugging, exploit code, and mitigation patch review.
In this lab, I use:






$ref prohibits references to $array.
First loop: $ref reference to $array['a'].
Second of the loop: $ref reference to $array['a']['b'].
Third of the loop: $ref reference to $array['a']['b']['c'].
The end result, $ref will be referenced to the value 42.
$array = [
'a' => [
'b' => [
'c' => 42
]
]
];
$parents = ['a', 'b', 'c'];



** Drupal 8.6.5
/core/lib/Drupal/Core/DrupalKernel.php
/core/lib/Drupal/Core/Security/RequestSanitizer.php
** The stripDangerousValues function verifies all the input parameters one by one, the first elements of the input array have a value starting with “#” and the values not whitelisted are removed.