NULL pointer dereference in SOAP apache:Map decoder with missing <value>
Package
ext-soap
(PHP)
Affected versions
< 8.2.31
< 8.3.31
< 8.4.21
< 8.5.6
Patched versions
8.2.31
8.3.31
8.4.21
8.5.6
to_zval_map()inext/soap/php_encoding.cdecodesapache:Mapnodes. The<key>branch correctly guards against missing keys, but the<value>branch rechecksxmlKeyinstead ofxmlValue:php-src/ext/soap/php_encoding.c
Lines 2780 to 2788 in 0d9ff00
In addition,
master_to_zval_int()accessesdata->propertieswithout aNULLcheck, wheredatacorresponds to the missing<value>node. This branch is reachable whenSOAP_GLOBAL(typemap)is set, i.e. when the SOAP server has a typemap configured. By embedding anapache:Mapnode with a missing<value>node into the request, the process will segfault with aNULLpointer dereference violation. Under the described circumstances, DoS becomes trivial with the following example: