CVE-2026-44167 Overview
CVE-2026-44167 is a resource exhaustion vulnerability [CWE-400] in phpseclib, a widely deployed PHP secure communications library. The flaw affects applications that parse untrusted ASN.1 data such as X.509 certificates, RSA PKCS8 private keys, and public keys. It is a bypass of the previously disclosed CVE-2024-27355, which attempted to bound Object Identifier (OID) sizes. Maintainers fixed the issue in phpseclib 1.0.29, 2.0.54, and 3.0.52. Attackers can deliver malformed ASN.1 input over the network without authentication or user interaction, triggering availability impact on the host process.
Critical Impact
Unauthenticated attackers can submit crafted ASN.1 structures to exhaust resources in phpseclib parsers, leading to denial of service in any PHP application that consumes untrusted certificates or keys.
Affected Products
- phpseclib 1.x prior to 1.0.29
- phpseclib 2.x prior to 2.0.54
- phpseclib 3.x prior to 3.0.52
Discovery Timeline
- 2026-05-12 - CVE-2026-44167 published to the National Vulnerability Database (NVD)
- 2026-05-13 - Last updated in NVD database
Technical Details for CVE-2026-44167
Vulnerability Analysis
The vulnerability lives in phpseclib's ASN.1 decoder, specifically the routine that parses Object Identifiers (OIDs) inside DER-encoded structures. The earlier fix for CVE-2024-27355 capped OID content length at 4096 bytes, but that limit remained large enough to permit costly parsing operations on attacker-controlled input. By embedding oversized OIDs inside legitimate-looking ASN.1 envelopes such as X.509 certificates or PKCS8 key blobs, an attacker can force the parser into expensive arithmetic and string handling. The class of bug is [CWE-400] Uncontrolled Resource Consumption, mapped here to a denial-of-service outcome on the PHP worker handling the input.
Root Cause
The _decodeOID routine in phpseclib/File/ASN1.php accepted OID payloads up to 4096 bytes. Real-world OIDs are short — typically under 20 bytes — so the original threshold provided no meaningful boundary. Each oversized OID requires base-128 decoding and big-integer style accumulation per byte, making parsing time scale with attacker-controlled length.
Attack Vector
An attacker submits a malformed certificate, public key, or other ASN.1 blob to any endpoint that calls phpseclib parsers on untrusted input. No credentials or user interaction are required. Common entry points include TLS certificate validation, SSH host-key handling, JWT/JOSE flows backed by phpseclib, and file upload features that accept PEM or DER material.
$pos = 0;
$len = strlen($content);
// see https://github.com/openjdk/jdk/blob/2deb318c9f047ec5a4b160d66a4b52f93688ec42/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java#L55
- if ($len > 4096) {
- //user_error('Object Identifier size is limited to 4096 bytes');
+ if ($len > 128) {
+ //user_error('Object Identifier size is limited to 128 bytes');
return false;
}
Source: phpseclib commit d53d2021. The patch reduces the maximum OID length from 4096 bytes to 128 bytes, aligning with OpenJDK's ObjectIdentifier limit and removing the cost amplification primitive.
Detection Methods for CVE-2026-44167
Indicators of Compromise
- PHP-FPM or Apache worker processes consuming sustained high CPU while parsing inbound certificates or keys.
- HTTP requests delivering PEM, DER, or PKCS8 payloads larger than expected to endpoints backed by phpseclib.
- Repeated timeouts or 504 responses from endpoints that accept X.509 certificates or SSH keys.
Detection Strategies
- Inventory application dependencies for phpseclib versions below 1.0.29, 2.0.54, and 3.0.52 using composer.lock audits.
- Inspect web application firewall logs for ASN.1 inputs containing OID octet runs greater than 128 bytes.
- Correlate spikes in PHP worker CPU time with concurrent inbound certificate or key upload traffic.
Monitoring Recommendations
- Alert on sustained CPU saturation in PHP runtimes tied to ASN.1 parsing call stacks.
- Track HTTP request body sizes against endpoints that consume certificates, keys, or JWTs.
- Forward web server and PHP error logs to centralized analytics for anomaly detection across the fleet.
How to Mitigate CVE-2026-44167
Immediate Actions Required
- Upgrade phpseclib to 1.0.29, 2.0.54, or 3.0.52 depending on the major version in use.
- Rebuild and redeploy application containers and PHAR archives that bundle phpseclib as a vendored dependency.
- Restart PHP-FPM workers after upgrading to ensure cached opcode for the old ASN1.php is evicted.
Patch Information
The maintainers shipped the fix in GHSA-3qpq-r242-jqj7 and commit d53d2021bcb9f6a04d5d44ec99e6bbef219a71bc. The change lowers the OID length cap from 4096 bytes to 128 bytes inside phpseclib/File/ASN1.php, aligning with limits used by other mainstream cryptographic libraries.
Workarounds
- Reject ASN.1 inputs at the edge when total payload size exceeds expected certificate or key dimensions.
- Apply request rate limits and CPU time caps to endpoints that parse untrusted PEM, DER, or PKCS8 material.
- Pre-validate certificates with a hardened parser such as OpenSSL before passing data to phpseclib if upgrade is delayed.
# Upgrade phpseclib using Composer
composer require phpseclib/phpseclib:^3.0.52
composer update phpseclib/phpseclib
# Verify installed version
composer show phpseclib/phpseclib | grep versions
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

