phpseclib/phpseclib: is it safe?

Short answer: Version 4.0.3 or later has a fix for every vulnerability listed here. Older versions may be affected: check the table against the exact version you run.

Composer phpseclib/phpseclib has 12 known advisories in the phpwarden feed. Feed 2026.11.23.2, updated 2026-11-23.

12advisories
0critical
0on CISA KEV
0no fix recorded
CVETitleSeverityCVSSAffectedFixed in
CVE-2021-30130Improper Certificate Validation in phpseclibhigh7.5>=3.0.0 and <3.0.7 or <2.0.313.0.7, 2.0.31
CVE-2023-27560phpseclib Infinite Loop vulnerabilityhigh7.5>=3.0.0 and <3.0.193.0.19
CVE-2023-49316Phpseclib needs guardrails on large binaryfield integershigh7.5>=3.0.0 and <3.0.343.0.34
CVE-2024-27354phpseclib: guardrails needed on isPrime and randomPrimehigh7.5>=0.1.1 and <1.0.23 or >=2.0.0 and <2.0.47 or >=3.0.0 and <3.0.36 or >=1.0.0 and <1.0.231.0.23, 2.0.47, 3.0.36
CVE-2024-27355phpseclib guardrails needed on OID lengthhigh7.5>=2.0.0 and <2.0.47 or >=3.0.0 and <3.0.36 or >=0.1.1 and <1.0.23 or >=1.0.0 and <1.0.232.0.47, 3.0.36, 1.0.23
CVE-2026-32935phpseclib's AES-CBC unpadding susceptible to padding oracle timing attackhigh0.0>=3.0.0 and <3.0.50 or >=2.0.0 and <2.0.52 or >=0.1.1 and <1.0.273.0.50, 2.0.52, 1.0.27
CVE-2023-52892Name confusion in x509 Subject Alternative Name fieldshigh7.5<1.0.22 or >=2.0.0 and <2.0.46 or >=3.0.0 and <3.0.331.0.22, 2.0.46, 3.0.33
CVE-2026-40194phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()low3.7>=0.1.1 and <1.0.28 or >=2.0.0 and <2.0.53 or >=3.0.0 and <3.0.511.0.28, 2.0.53, 3.0.51
CVE-2026-84308phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recoverymedium6.3<3.0.57 or >=4.0.0 and <4.0.13.0.57, 4.0.1
CVE-2026-55599phpseclib: X.509 certificate validation sends attacker-controlled outbound requests (server-side request forgery) via Authority Information medium5.8>=0.1.1 and <1.0.30 or >=2.0.0 and <2.0.55 or >=3.0.0 and <3.0.541.0.30, 2.0.55, 3.0.54
CVE-2026-44167phpseclib has a CVE-2024-27355 mitigation bypass — OID amplification DoS in ASN1::decodeOID()high7.5>=0.1.1 and <1.0.29 or >=2.0.0 and <2.0.54 or >=3.0.0 and <3.0.521.0.29, 2.0.54, 3.0.52
2026-11-02-1phpseclib unbounded PBKDF iteration count in encrypted key/PFX/CMS parsing enables CPU-exhaustion DoSunknown0.0>=4.0.0 and <4.0.3 or >=3.0.0 and <3.0.58 or >=2.0.0 and <2.0.56 or >=1.0.0 and <1.0.314.0.3, 3.0.58, 2.0.56, 1.0.31

Quick answers

Is phpseclib/phpseclib safe to use?

Version 4.0.3 or later has a fix for every vulnerability listed here. Older versions may be affected: check the table against the exact version you run.

Is phpseclib/phpseclib being actively exploited?

None of its 12 known vulnerabilities are on CISA's Known Exploited Vulnerabilities list today.

How do I check my own site?

Run `phpwarden deps composer.lock`. phpwarden compares the exact version you have installed with these advisories and lists only the ones that apply, exploited ones first.

Am I affected?

Find out in one command. phpwarden checks your composer.lock against this advisory and 21,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden deps composer.lock

# or, without Composer
pipx install phpwarden   &&   phpwarden deps composer.lock

Or keep it checked automatically: GitHub Action · pre-commit hook · GitLab CI · Laravel artisan command

Install docs   How findings are ranked
A version is vulnerable when it falls inside an affected range and below the fixed version. phpwarden applies these ranges to the exact versions in your lockfile or install, so you only see what applies to you.

Add this status to your README

phpwarden status badge

Maintainer of this package? The badge updates itself whenever the feed is rebuilt (twice a day). Add ?v=1.2.3 to the image address to show the status of one exact version.

[![phpwarden](https://phpwarden.io/badge/phpseclib/phpseclib.svg)](https://phpwarden.io/packages/phpseclib/phpseclib)