CVE-2025-6491: NULL Pointer Dereference in PHP SOAP Extension via Large XML Namespace Prefix

Published Jul 3, 2025
·
Updated

Fixed (NULL Pointer Dereference in PHP SOAP Extension via Large XML Namespace Prefix). (CVE-2025-6491)

Other sources

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.

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.

Red Hat

In PHP versions:8.1. before 8.1.33, 8.2. before 8.2.29, 8.3. before 8.3.23, 8.4. before 8.4.10 when parsing XML data in SOAP extensions, overly large (>2Gb) XML namespace prefix may lead to null pointer dereference. This may lead to crashes and affect the availability of the target server.

MITRE

Affected Software

8 affected componentsFixes available
PHP PHP<8.3.23
8.3.23
PHP PHP>=8.1.0<8.1.33
PHP PHP>=8.2.0<8.2.29
PHP PHP>=8.3.0<8.3.23
PHP PHP>=8.4.0<8.4.10
Microsoft cbl2 php 8.1.32-1
Microsoft azl3 php 8.3.23-1
Microsoft cbl2 php 8.1.33-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.3.23
  2. Upgrade

    Upgrade PHP 8.1 to a version that resolves this vulnerability.

    Fixed in 8.1.33
  3. Upgrade

    Upgrade PHP 8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.29
  4. Upgrade

    Upgrade PHP 8.3 to a version that resolves this vulnerability.

    Fixed in 8.3.23
  5. Upgrade

    Upgrade PHP 8.4 to a version that resolves this vulnerability.

    Fixed in 8.4.10
  6. Upgrade

    Upgrade libxml to a version that resolves this vulnerability.

    Fixed in 2.13
  7. Compensating control

    Ensure applications do not use a namespace prefix (or other fully-qualified name used in SoapVar) from an untrusted source such as a remote SOAP service; prevent attacker-controlled oversized (>2Gb) XML namespace prefixes/names from reaching PHP SOAP serialization.

Event History

Jul 3, 2025
CVE Published
via PHP·12:00 AM
Data Sourced
via PHP·12:00 AM
DescriptionAffected Software
Jul 8, 2025
Data Sourced
via Red Hat·05:34 PM
DescriptionSeverityAffected Software
Jul 13, 2025
CVE Published
via MITRE·10:10 PM
Data Sourced
via MITRE·10:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeaknessAffected Software
Aug 6, 2025
Data Sourced
via Microsoft·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·12:00 AM
Affected Software
Updated
via Microsoft·12:00 AM
SeverityAffected Software
Updated
via Microsoft·12:00 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2025-6491?

CVE-2025-6491 has a high severity rating due to the potential for a denial of service via NULL pointer dereference.

2

What versions of PHP are affected by CVE-2025-6491?

CVE-2025-6491 affects PHP versions 8.1.* before 8.1.33, 8.2.* before 8.2.29, 8.3.* before 8.3.23, and 8.4.* before 8.4.10.

3

How do I fix CVE-2025-6491?

To fix CVE-2025-6491, upgrade to PHP version 8.3.23 or newer.

4

What impact does CVE-2025-6491 have on my web application?

CVE-2025-6491 can cause your web application to crash if it attempts to process excessively large XML namespace prefixes.

5

Is there a workaround for CVE-2025-6491?

There is no official workaround for CVE-2025-6491; upgrading to a patched PHP version is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203