← PHP / Laravel 목차

PHP-093 / 고급

YAML 파서에서 객체 태그 허용 (Symfony YAML)

A08:2021 Software and Data Integrity Failures · CWE-502 Deserialization of Untrusted Data

왜 문제가 될까요?

!php/object 태그로 객체가 생성되어 gadget 체인이 실행된다.

이렇게 수정하세요

php
$data = Yaml::parse($request->getContent());   // 객체 플래그 없이, 신뢰 입력은 JSON 권장

더 읽기