CVE-2026-128090

Improper Verification of Cryptographic Signature
Affects
PHP
in
PHP
No items found.
Versions
>=5.3.0 <8.2.36, >=8.3.0 <8.3.37, >=8.4.0 <8.4.28, >=8.5.0 <8.5.13

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

PHP is a general-purpose scripting language used mostly for web development. It runs behind web servers through server APIs such as Apache mod_php and PHP-FPM, and powers content management systems and frameworks such as WordPress, Drupal, Moodle and Laravel. The phar extension packages PHP applications into archives and can verify an archive's signature when it is loaded. For an OpenSSL signature, PHP reads the public key from a separate .pubkey file stored next to the archive.

A Security Bypass vulnerability (CVE-2026-128090) has been identified in the signature verification of the phar extension, which allows an attacker who can modify an OpenSSL-signed Phar archive, but not its trusted public key, to make PHP accept arbitrary archive contents by changing the signature type to a keyless hash. Applications that execute the archive may then run attacker-controlled PHP code. The PHP project tracks this issue as GHSA-68fq-fh7h-f8gr.

Per MITRE CWE-347: The product does not verify, or incorrectly verifies, the cryptographic signature for data.

This issue affects PHP 5.3.0 and later before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28 and PHP 8.5 before 8.5.13, which includes the End-of-Life release lines PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 through their final releases.

Details

Module Info

Vulnerability Info

This High-severity vulnerability is found in the phar extension of PHP 5.3.0 and later before 8.2.36, PHP 8.3 before 8.3.37, PHP 8.4 before 8.4.28 and PHP 8.5 before 8.5.13, which includes the End-of-Life release lines PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 through their final releases. The PHP project scores it 7.7 under CVSS 4.0 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N). The PHP project classifies it as CWE-347 and CWE-757.

A Phar archive records its own signature type. In the native format it is stored in the four bytes before the GBMB magic, and tar- and zip-based archives store it in the first four bytes of .phar/signature.bin. phar_verify_signature() selects the verification method from that value. In PHP 8.5.12, the selection starts:

switch (sig_type) {
    case PHAR_SIG_OPENSSL_SHA512:
    case PHAR_SIG_OPENSSL_SHA256:
    case PHAR_SIG_OPENSSL: {
#ifdef PHAR_HAVE_OPENSSL

Only the OpenSSL signature types read the .pubkey file. The MD5, SHA-1, SHA-256 and SHA-512 types compare a digest that anyone can recompute. Because the signature type is not covered by the signature, an attacker can replace the archive contents, select a hash type such as SHA-256 and store a matching digest. Verification then succeeds, phar.require_hash=1 is satisfied and the trusted public key is never consulted.

Exploitation requires an application that relies on an OpenSSL-signed Phar with a public key installed through a trusted channel, an attacker who can alter or replace the archive but not the key file, and the application then loading the archive. Native, tar- and zip-based executable phars are affected, as are explicitly signed tar- and zip-based PharData archives. If the attacker can also remove or replace the .pubkey file, they can already supply an archive signed with their own key, and the fix does not protect that deployment.

The advisory states that this behavior has been present since OpenSSL Phar signatures were introduced in PHP 5.3.0, which includes every End-of-Life release line from PHP 5.6 through 8.1.

The fix rejects a signature that is not an OpenSSL type when a .pubkey file next to the archive shows that OpenSSL verification is expected. Archives without such a file keep their existing behavior:

spprintf(&pfile, 0, "%s.pubkey", fname);
has_pubkey = php_stream_stat_path_ex(pfile, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) == 0;
efree(pfile);

if (has_pubkey) {
    if (error) {
        spprintf(error, 0, "openssl public key found, but the signature does not use openssl");
    }
    return FAILURE;
}

Mitigation

The PHP project publishes security fixes only for its supported release lines. PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 are End-of-Life and will not receive any public updates to address this issue.

With or without the fix, the protection depends on the .pubkey file. Obtain the publisher's public key through an authenticated channel and install it next to the archive with permissions that stop the archive's update or download path from removing or replacing it. If the key can't be protected independently, or an upgrade is not yet possible, verify the archive with another mechanism that pins a trusted key before PHP loads it. The phar.require_hash setting alone detects corruption and does not authenticate keyless signatures.

Users of the affected components should apply one of the following mitigations:

  • Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, or later.
  • Leverage a commercial support partner like HeroDevs (NES for PHP) for post-EOL security support.

Credits

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2026-128090
PROJECT Affected
PHP
Versions Affected
>=5.3.0 <8.2.36, >=8.3.0 <8.3.37, >=8.4.0 <8.4.28, >=8.5.0 <8.5.13
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
November 19, 2026
Fixed in
Category
Improper Verification of Cryptographic Signature
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
PHP
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.