CVE-2026-14355 Overview
CVE-2026-14355 is a heap buffer overflow [CWE-122] in the PHP OpenSSL extension. The AES-WRAP-PAD algorithm implementation sizes the output buffer from the plaintext length without accounting for RFC 5649 padding expansion. When PHP invokes the AES key-wrap-with-padding operation, OpenSSL writes beyond the allocated buffer, corrupting heap metadata and aborting the process. Affected versions include PHP 8.2.x before 8.2.32, 8.3.x before 8.3.32, 8.4.x before 8.4.23, and 8.5.x before 8.5.8. Debian Linux 12 packages are also affected. The flaw impacts availability by triggering application termination on vulnerable servers processing attacker-influenced key-wrap operations.
Critical Impact
Remote unauthenticated attackers can crash PHP processes by triggering AES-WRAP-PAD operations with crafted inputs, corrupting heap metadata and forcing application abort.
Affected Products
- PHP 8.2.x before 8.2.32, 8.3.x before 8.3.32, 8.4.x before 8.4.23, 8.5.x before 8.5.8
- Debian Linux 12 (bookworm) PHP packages
- Applications using the PHP OpenSSL extension with openssl_encrypt() and AES key-wrap-with-padding cipher
Discovery Timeline
- 2026-07-03 - CVE-2026-14355 published to NVD
- 2026-07-08 - Last updated in NVD database
Technical Details for CVE-2026-14355
Vulnerability Analysis
The vulnerability resides in the PHP OpenSSL extension's handling of the AES-WRAP-PAD cipher mode. RFC 5649 defines an AES key wrap with padding algorithm that expands the ciphertext output relative to the plaintext input. The wrap operation pads plaintext to the next 8-byte boundary and prepends an 8-byte integrity check value, producing ciphertext larger than the input.
The PHP implementation allocates the output buffer using the plaintext length as the sizing basis. It fails to reserve additional bytes for the RFC 5649 expansion. When OpenSSL performs the wrap operation, it writes the expanded ciphertext into the undersized buffer. The write overruns the heap allocation and corrupts adjacent heap metadata.
The corruption manifests as an application abort when the heap allocator validates chunk metadata during subsequent operations. This condition is classified as a heap-based buffer overflow under [CWE-122].
Root Cause
The root cause is missing arithmetic for RFC 5649 output expansion during buffer allocation. The code path sizes the destination buffer from the plaintext length without adding the padding block and the 8-byte integrity check value required by the key wrap with padding specification.
Attack Vector
Exploitation requires the target application to invoke the OpenSSL extension with the AES-WRAP-PAD cipher using attacker-controlled plaintext. The attack requires no authentication and no user interaction over the network. The primary impact is denial of service through process termination. The vulnerability does not compromise confidentiality or integrity based on the assigned CVSS vector.
Refer to the PHP Security Advisory GHSA-7jrw-539f-x6vr for the technical details of the affected code path.
Detection Methods for CVE-2026-14355
Indicators of Compromise
- Unexpected PHP-FPM or Apache mod_php worker crashes with heap corruption or malloc assertion messages in error logs
- Repeated SIGABRT signals from PHP processes correlating with requests that invoke openssl_encrypt() or openssl_cipher_iv_length() with aes-*-wrap-pad cipher names
- Elevated 502 or 504 gateway errors from web tiers fronting affected PHP versions
Detection Strategies
- Inventory PHP versions across servers and flag hosts running 8.2.x below 8.2.32, 8.3.x below 8.3.32, 8.4.x below 8.4.23, and 8.5.x below 8.5.8
- Grep application source for references to aes-128-wrap-pad, aes-192-wrap-pad, and aes-256-wrap-pad cipher identifiers to locate exposed code paths
- Monitor web application firewall logs for POST bodies or JSON parameters that reach endpoints invoking key wrap operations
Monitoring Recommendations
- Alert on abnormal PHP worker restart rates and correlate with request URIs and client IP addresses
- Capture core dumps from PHP processes to confirm heap corruption signatures tied to the OpenSSL extension
- Track outbound reachability and request patterns to endpoints that call cryptographic APIs with user-supplied data
How to Mitigate CVE-2026-14355
Immediate Actions Required
- Upgrade PHP to 8.2.32, 8.3.32, 8.4.23, or 8.5.8 or later on all affected hosts
- Apply Debian security updates for php packages on Debian 12 systems per the Debian LTS Announcement
- Audit application code for AES-WRAP-PAD usage and restrict cipher selection to server-controlled values
Patch Information
The PHP project released fixed builds in the 8.2.32, 8.3.32, 8.4.23, and 8.5.8 branches. The fix corrects the output buffer sizing to account for RFC 5649 padding expansion before invoking the OpenSSL wrap operation. Details are documented in the PHP Security Advisory GHSA-7jrw-539f-x6vr.
Workarounds
- Disable code paths that expose AES-WRAP-PAD operations to untrusted input until patches are applied
- Validate and constrain plaintext length before calling openssl_encrypt() with key wrap cipher modes
- Restrict which cipher identifiers callers can select by enforcing a server-side allow list that excludes *-wrap-pad variants
# Verify PHP version after patching
php -v
# Debian 12: apply security updates
sudo apt-get update && sudo apt-get install --only-upgrade php php-cli php-fpm
# List loaded PHP modules and confirm OpenSSL extension version
php -m | grep -i openssl
php -r "echo OPENSSL_VERSION_TEXT, PHP_EOL;"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

