{"vuln_id":"GHSA-453j-q27h-5p8x","aliases":["CVE-2025-6491"],"description":"NULL Pointer Dereference in PHP SOAP Extension via Large XML Namespace Prefix","published_at":"2025-07-03T12:27:21Z","modified_at":"2025-07-03T15:16:04Z","first_seen_at":"2026-11-22T14:05:37.612524Z","severity":"medium","severity_source":"ghsa","cvss_score":5.9,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-476"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-453j-q27h-5p8x"},"matched_alias":null,"items":[{"id":12652,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-453j-q27h-5p8x / CVE-2025-6491: NULL Pointer Dereference in PHP SOAP Extension via Large XML Namespace Prefix","summary":"NULL Pointer Dereference in PHP SOAP Extension via Large XML Namespace Prefix ### Summary If a SoapVar instance is created with a fully qualified name larger than 2G, this will cause a NULL pointer dereference resulting in a segmentation fault, leading to a denial of service. **Product**: PHP <= 8.5.0-dev with libxml2 < 2.13 **Discovered by**: Ahmed Lekssays ([Qatar Computing Research Institute](https://cs.qcri.org)). ### Details Libxml versions prior to 2.13 cannot correctly handle a call to xmlNodeSetName() with a name longer than 2G. It will leave the node object in an invalid state with a NULL name. This later causes a NULL pointer dereference when using the name during message serialization. This can be exploited if a SoapVar is created with a fully qualified name that is longer than 2G. This would be possible if some application code uses a namespace prefix from an untrusted source like from a remote SOAP service. ### PoC Create a PHP file with the following content: ```php 'http://127.0.0.1/', // localhost dummy 'uri' => 'urn:dummy', 'trace' => 1, 'exceptions' => true, ]; try { $client = new SoapClient(null, $options); $client->__soapCall(\"DummyFunction\", [$soapVar]); } catch (Exception $e) { echo \"Caught Exception: \" . $e->getMessage() . \"\\n\"; } ?> ``` Run with: `php poc.php` The script will immediately crash with a segmentation fault. GDB shows the crash occurs in strcmp() with a null pointer dereference. Valgrind confirms \"Invalid read of size 1 at address 0x0\". ### Impact This is a null pointer dereference vulnerability (CWE-476) that affects any PHP installation with the SOAP extension enabled. The vulnerability can be triggered when a SoapVar is created with a qualified name based on user-controlled SOAP data. Impact includes: - Denial of Service: Reliable crash causing PHP process termination - Service disruption: Affects web applications using SOAP functionality ### GDB Trace ``` GNU gdb (Ubuntu 16.2-8ubuntu1) 16.2 Reading symbols from /usr/local/bin/php... (gdb) b xmlBuildQName Breakpoint 1 at 0x14b440 (gdb) run Starting program: /usr/local/bin/php poc.php [Thread debugging using libthread_db enabled] Using host libthread_db library \"/lib/aarch64-linux-gnu/libthread_db.so.1\". Program received signal SIGSEGV, Segmentation fault. __GI_strcmp () at ../sysdeps/aarch64/strcmp.S:78 (gdb) bt #0 __GI_strcmp () at ../sysdeps/aarch64/strcmp.S:78 #1 0x0000aaaaaaf8e72c in serialize_zval (val=0xfffff76010f0, param=0x0, paramName=0xffffffffc738 \"param0\", style=1, parent= Patched: 8.1.33, 8.2.29, 8.3.23, 8.4.10","url":"https://github.com/php/php-src/security/advisories/GHSA-453j-q27h-5p8x","published_at":"2025-07-03T12:27:21Z","updated_at":"2025-07-03T15:16:04Z","fetched_at":"2026-11-22T14:05:37.431188Z","severity":"medium","cvss_score":5.9,"epss":0.01117,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2025-6491","vuln_ids":["CVE-2025-1220","CVE-2025-1735","CVE-2025-6491","GHSA-453J-Q27H-5P8X"],"tags":["repo-advisory","CWE-476","security","repo:php/php-src","stack"],"cluster_id":11760,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12652","html":"https://vulnwatch.ve1ve2.com/item/12652"}}]}