Security advisory Cybersecurity

PHP security releases of 2 July 2026: 8.5.8, 8.4.23, 8.3.32 and 8.2.32 (AES key wrap fix)

The early July 2026 PHP releases fixed a memory corruption bug in openssl_encrypt() with AES key wrap with padding, and a TLS crash on PHP 8.3.

Published
Reading time
4 min read

Security advisory Vulnerability

Severity: High Status: Patched
Status
Fixed upstream in PHP 8.5.8, 8.4.23, 8.3.32 and 8.2.32. Distribution packages carry the fixes under their own version numbers.
Affected
  • PHP 8.5 before 8.5.8
  • PHP 8.4 before 8.4.23
  • PHP 8.3 before 8.3.32
  • PHP 8.2 before 8.2.32
Published
Updated

What you should do

  • Update every PHP runtime to the latest release of a supported branch and restart PHP services.
  • On PHP 8.3, treat this round as important if your applications fetch HTTPS URLs with file_get_contents() or similar functions.
  • If you use AES key wrap in PHP, test encryption and decryption after the update.
  • See our php2shell article for the October 2026 fixes, which are more urgent.
Timeline
  1. The PHP project released PHP 8.5.8, 8.4.23, 8.3.32 and 8.2.32.
  2. Skyline published this summary.

On 2 July 2026 the PHP project released PHP 8.5.8, 8.4.23, 8.3.32 and 8.2.32 as security releases (the 8.4.23 ChangeLog entry is dated 3 July). Every branch received a fix for a memory corruption bug in the OpenSSL extension's AES key wrap with padding mode. The 8.3 branch also received a TLS-related crash fix that 8.4 and 8.5 had already received in May.

At a glance

ItemDetails
ProductPHP (php-src), branches 8.2 to 8.5
Fixed versions8.5.8, 8.4.23, 8.3.32, 8.2.32 (2 July 2026)
CVEsCVE-2026-14355 (all branches); CVE-2026-12184 (8.3.32 only in this round)
SeverityMedium for CVE-2026-14355; High for CVE-2026-12184 on PHP 8.3
DebianDSA-6377-1 (trixie, php8.4 8.4.23-1~deb13u1); DLA-4669-1 (bookworm, php8.2 8.2.32-1~deb12u1), both 4 July 2026

What the vulnerabilities are

CVE-2026-14355: AES-WRAP-PAD buffer sizing (all branches)

When openssl_encrypt() uses AES key wrap with padding (RFC 5649), PHP sized the output buffer from the plaintext length without allowing for the expansion that key wrapping adds. According to the CVE record, OpenSSL may then write beyond the allocated memory, corrupting heap metadata and triggering an application abort. The ChangeLog tracks it as bug GH-22187 ("zend_mm_heap corrupted" in openssl_encrypt with AES-WRAP-PAD). The CVE record, published by PHP as CNA, scores it CVSS 3.1 5.6 (Medium). Debian describes the result as memory corruption. Only code that actually uses the key-wrap-with-padding ciphers reaches this path.

CVE-2026-12184: crash when TLS setup fails (PHP 8.3)

PHP's advisory GHSA-mhmq-mmqj-2v39 (High, CVSS 4.0 8.2) explains that when the HTTP stream wrapper fails to set up TLS, for example because of a peer name mismatch or an expired certificate, a cleanup step used a stream that had already been closed. A remote server can trigger it without specially crafted PHP code, and the advisory says the impact is a remotely triggered denial of service that brings down the FPM process with all its workers. It was fixed for 8.4 and 8.5 on 7 May 2026 and for 8.3 in 8.3.32. PHP 8.2 is not affected, according to Debian's tracker.

Neither CVE is in CISA's Known Exploited Vulnerabilities catalog (30 October 2026 edition).

Are you affected?

Check the PHP version and whether your code uses the key-wrap-with-padding ciphers:

php -v
grep -rniE 'wrap-pad' /var/www 2>/dev/null | head

Upstream builds older than 8.5.8, 8.4.23, 8.3.32 or 8.2.32 lack the CVE-2026-14355 fix. On Debian, compare with DSA-6377-1 for Debian 13 (trixie) and DLA-4669-1 for Debian 12 (bookworm), which now receives PHP fixes from the Debian LTS team:

apt policy php8.4-fpm php8.4-cli   # trixie: fixed in 8.4.23-1~deb13u1
apt policy php8.2-fpm php8.2-cli   # bookworm: fixed in 8.2.32-1~deb12u1

Ubuntu users should check Ubuntu Security Notices.

How to update

On Debian and Ubuntu run sudo apt update and sudo apt upgrade. For source, Windows and container builds, install the newest release of your branch from php.net/downloads. These July versions are already superseded: as of 31 October 2026 the current releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35.

Restart or reboot?

No reboot is needed. Restart PHP-FPM and Apache (mod_php) so the workers load the new code, plus any long-running PHP workers:

sudo systemctl restart php8.4-fpm   # or php8.2-fpm on bookworm

Sources

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Cybersecurity for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.