CVE-2026-14355

ext/openssl: Memory corruption in openssl_encrypt with AES-WRAP-PAD

Published Jul 3, 2026 CVSS 3.1 · 5.6 Medium EPSS < 1% KEV · Not listed
Description
In PHP versions 8.2.* before 8.2.32, 8.3.* before 8.3.32, 8.4.* before 8.4.23, 8.5.* before 8.5.8, the AES-WRAP-PAD algorithm implementation in OpenSSL extension contains a buffer allocation flaw. The output buffer for the AES key-wrap-with-padding operation is sized from the plaintext length without accounting for RFC 5649 expansion. This may cause OpenSSL to write beyond allocated memory, corrupting heap metadata and triggering application abort.

Analysis

AI-generated

Technical impact

The vulnerability is a buffer allocation flaw in PHP's OpenSSL extension that occurs when the AES‑WRAP‑PAD algorithm is used. The routine calculates the output buffer size based solely on the plaintext length and ignores the padding expansion required by RFC 5649, causing OpenSSL to write beyond the allocated memory. This corrupts heap metadata and leads the PHP interpreter to abort, resulting in a denial‑of‑service without granting code execution or data disclosure.

Affected Systems

The flaw affects PHP versions 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 when the OpenSSL extension's AES‑WRAP‑PAD function is invoked. Any PHP application configured to use that algorithm is vulnerable; applications that never call openssl_encrypt with AES‑WRAP‑PAD are not affected.

Risk and Exploitability

The CVSS score of 5.6 places the vulnerability in the moderate range and the EPSS score of less than 1 % indicates a very low likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. An attacker can trigger the fault by supplying crafted input to openssl_encrypt with AES‑WRAP‑PAD, but requires the ability to control application input, which limits the attack surface to sites where user input reaches the vulnerable routine.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PHP to 8.2.32, 8.3.32, 8.4.23, 8.5.8, or a newer release that contains the fix.
  • If an upgrade cannot be performed, avoid using the AES‑WRAP‑PAD algorithm in openssl_encrypt calls within the application.
  • Validate and sanitise input data before passing it to openssl_encrypt, ensuring it meets expected length and format constraints to reduce the chance of malformed payloads triggering the overflow.

Generated by OpenCVE AI on August 1, 2026 at 19:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4669-1 php8.2 security update
Debian DSA Debian DSA DSA-6377-1 php8.4 security update
Ubuntu USN Ubuntu USN USN-8564-1 PHP vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Php
Php php
Vendors & Products Php
Php php
Type Values Removed Values Added
Description In PHP versions 8.2.* before 8.2.32, 8.3.* before 8.3.32, 8.4.* before 8.4.23, 8.5.* before 8.5.8, the AES-WRAP-PAD algorithm implementation in OpenSSL extension contains a buffer allocation flaw. The output buffer for the AES key-wrap-with-padding operation is sized from the plaintext length without accounting for RFC 5649 expansion. This may cause OpenSSL to write beyond allocated memory, corrupting heap metadata and triggering application abort.
Title ext/openssl: Memory corruption in openssl_encrypt with AES-WRAP-PAD
Weaknesses CWE-122
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Jul 6, 2026, 1:57 PM
Reserved
Jul 1, 2026, 5:52 PM
Status
Analyzed
Published
Jul 3, 2026, 9:16 PM
Modified
Jul 8, 2026, 8:11 PM