Last active
September 9, 2025 14:43
-
-
Save LouisdeLooze/5ac21a88ead57e747569cdb08bd60011 to your computer and use it in GitHub Desktop.
Hotfix for CVE-2025-54236
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/vendor/magento/framework/Webapi/ServiceInputProcessor.php b/vendor/magento/framework/Webapi/ServiceInputProcessor.php | |
| index ba58dc2bc7acf..06919af36d2eb 100644 | |
| --- a/vendor/magento/framework/Webapi/ServiceInputProcessor.php | |
| +++ b/vendor/magento/framework/Webapi/ServiceInputProcessor.php | |
| @@ -246,6 +246,13 @@ private function getConstructorData(string $className, array $data): array | |
| if (isset($data[$parameter->getName()])) { | |
| $parameterType = $this->typeProcessor->getParamType($parameter); | |
| + // Allow only simple types or Api Data Objects | |
| + if (!($this->typeProcessor->isTypeSimple($parameterType) | |
| + || preg_match('~\\\\?\w+\\\\\w+\\\\Api\\\\Data\\\\~', $parameterType) === 1 | |
| + )) { | |
| + continue; | |
| + } | |
| + | |
| try { | |
| $res[$parameter->getName()] = $this->convertValue($data[$parameter->getName()], $parameterType); | |
| } catch (\ReflectionException $e) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment