Description
php_openssl_matches_wildcard_name() in ext/openssl/xp_ssl.c underflows the length argument passed to memchr() when a TLS server certificate presents a wildcard name whose literal characters are together longer than the hostname being verified. A malicious server presenting such a certificate makes the PHP client read up to SIZE_MAX bytes past the end of a heap allocation. The path is reachable from any default client stream, because verify_peer_name is enabled by default.
Published: 2026-09-25
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Update PHP Now
AI Analysis

Impact

A heap buffer overflow occurs in PHP’s OpenSSL wrapper when the function php_openssl_matches_wildcard_name compares a wildcard certificate CN whose literal characters exceed the hostname being verified. The function underflows the length argument to memchr, causing PHP to read up to SIZE_MAX bytes past the end of a heap allocation, which can lead to an out‑of‑bounds read, memory corruption, and potentially arbitrary code execution or a crash of the PHP process.

Affected Systems

The vulnerability affects the PHP Group’s PHP implementation. No specific affected versions are listed in the advisory, so any installed PHP that has not yet been updated to the patched release is potentially vulnerable.

Risk and Exploitability

The CVSS score of 6.5 rates the issue as medium severity, and with no EPSS data available the likelihood of exploitation remains uncertain. The path is reachable from any default client stream, as peer name verification is enabled by default. An attacker who can control the server certificate presented to a PHP client can exploit this flaw from the client side, achieving code execution or denial of service if successful. The vulnerability is not listed in the CISA KEV catalog.

Generated by OpenCVE AI on September 26, 2026 at 01:58 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PHP to the latest supported release that includes the fix for the heap buffer overflow in ext/openssl/xp_ssl.c
  • If an upgrade is not immediately possible, configure PHP streams to disable peer name verification—for example, set the ssl.verify_peer_name option to false in the stream context used for external TLS connections
  • Validate that any external TLS certificates do not use wildcards whose literal length exceeds the hostname of the PHP client, and avoid connecting to such servers until the issue is resolved

Generated by OpenCVE AI on September 26, 2026 at 01:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4819-1 php8.2 security update
Debian DSA Debian DSA DSA-6514-1 php8.4 security update
Ubuntu USN Ubuntu USN USN-8936-1 PHP vulnerabilities
History

Tue, 27 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
First Time appeared Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
Vendors & Products Php
Php php

Mon, 28 Sep 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 26 Sep 2026 08:45:00 +0000

Type Values Removed Values Added
First Time appeared Php Group
Php Group php
Vendors & Products Php Group
Php Group php

Sat, 26 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-125
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 25 Sep 2026 21:00:00 +0000

Type Values Removed Values Added
Description php_openssl_matches_wildcard_name() in ext/openssl/xp_ssl.c underflows the length argument passed to memchr() when a TLS server certificate presents a wildcard name whose literal characters are together longer than the hostname being verified. A malicious server presenting such a certificate makes the PHP client read up to SIZE_MAX bytes past the end of a heap allocation. The path is reachable from any default client stream, because verify_peer_name is enabled by default.
Title Heap-buffer-overflow in php_openssl_matches_wildcard_name on crafted server cert wildcard CN
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: php

Published:

Updated: 2026-09-28T13:31:31.640Z

Reserved: 2026-09-15T00:41:16.041Z

Link: CVE-2026-91767

cve-icon Vulnrichment

Updated: 2026-09-28T13:24:45.149Z

cve-icon NVD

Status : Analyzed

Published: 2026-09-25T21:17:24.793

Modified: 2026-10-27T13:14:13.607

Link: CVE-2026-91767

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-25T20:53:42Z

Links: CVE-2026-91767 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-26T08:30:02Z

Weaknesses