Skip to content

Commit 69a6087

Browse files
authored
Patch for CVE-2025-54236 - WebAPI-improvement (#160)
1 parent 3fec6ca commit 69a6087

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,13 @@ private function getConstructorData(string $className, array $data): array
246246
if (isset($data[$parameter->getName()])) {
247247
$parameterType = $this->typeProcessor->getParamType($parameter);
248248

249+
// Allow only simple types or Api Data Objects
250+
if (!($this->typeProcessor->isTypeSimple($parameterType)
251+
|| preg_match('~\\\\?\w+\\\\\w+\\\\Api\\\\Data\\\\~', $parameterType) === 1
252+
)) {
253+
continue;
254+
}
255+
249256
try {
250257
$res[$parameter->getName()] = $this->convertValue($data[$parameter->getName()], $parameterType);
251258
} catch (\ReflectionException $e) {

0 commit comments

Comments
 (0)