phpseclib/phpseclib vulnerabilities

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

Registry
Composer
Latest
4.0.3
License
MIT

11 known advisories

The latest version, 4.0.3, is not affected by any of them. Projects on older versions may be.

Update to the latest version:composer require phpseclib/phpseclib:^4.0.3

Is your project on an affected phpseclib/phpseclib?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for phpseclib/phpseclib

  • MediumCVE-2026-84308GHSA-q97c-8qh3-fpc68 Sept 2026

    phpseclib — non-constant-time X25519 scalar multiplication permits full private-key recovery

    Affected
    <3.0.57 · >=4.0.0 <4.0.1
    Fixed in
    3.0.57, 4.0.1
  • MediumCVE-2026-55599GHSA-m557-wrgg-6rp416 Jun 2026

    phpseclib: X.509 certificate validation sends attacker-controlled outbound requests (server-side request forgery) via Authority Information Access

    Affected
    >=0.1.1 <1.0.30 · >=2.0.0 <2.0.55 · >=3.0.0 <3.0.54
    Fixed in
    1.0.30, 2.0.55, 3.0.54
  • HighCVE-2023-49316GHSA-2f25-pfq3-c7h88 May 2026

    Phpseclib needs guardrails on large binaryfield integers

    Affected
    >=3.0.0 <3.0.34
    Fixed in
    3.0.34
  • HighCVE-2024-27355GHSA-f2qx-66wf-wvvx8 May 2026

    phpseclib guardrails needed on OID length

    Affected
    >=2.0.0 <2.0.47 · >=3.0.0 <3.0.36 · >=0.1.1 <1.0.23
    Fixed in
    1.0.23, 2.0.47, 3.0.36
  • HighCVE-2024-27354GHSA-2528-jw5q-ww886 May 2026

    phpseclib: guardrails needed on isPrime and randomPrime

    Affected
    >=0.1.1 <1.0.23 · >=2.0.0 <2.0.47 · >=3.0.0 <3.0.36
    Fixed in
    1.0.23, 2.0.47, 3.0.36
  • HighCVE-2026-44167GHSA-3qpq-r242-jqj75 May 2026

    phpseclib has a CVE-2024-27355 mitigation bypass — OID amplification DoS in ASN1::decodeOID()

    Affected
    >=0.1.1 <1.0.29 · >=2.0.0 <2.0.54 · >=3.0.0 <3.0.52
    Fixed in
    1.0.29, 2.0.54, 3.0.52
  • LowCVE-2026-40194GHSA-r854-jrxh-36qx10 Apr 2026

    phpseclib has a variable-time HMAC comparison in SSH2::get_binary_packet() using != instead of hash_equals()

    Affected
    >=0.1.1 <1.0.28 · >=2.0.0 <2.0.53 · >=3.0.0 <3.0.51
    Fixed in
    1.0.28, 2.0.53, 3.0.51
  • HighCVE-2026-32935GHSA-94g3-g5v7-q4jg19 Mar 2026

    phpseclib's AES-CBC unpadding susceptible to padding oracle timing attack

    Affected
    >=3.0.0 <3.0.50 · >=2.0.0 <2.0.52 · >=0.1.1 <1.0.27
    Fixed in
    1.0.27, 2.0.52, 3.0.50
  • HighCVE-2023-52892GHSA-ff7q-6vwh-v9m428 Jun 2024

    Name confusion in x509 Subject Alternative Name fields

    Affected
    <1.0.22 · >=2.0.0 <2.0.46 · >=3.0.0 <3.0.33
    Fixed in
    1.0.22, 2.0.46, 3.0.33
  • HighCVE-2023-27560GHSA-hm7p-r324-hhf33 Mar 2023

    phpseclib Infinite Loop vulnerability

    Affected
    >=3.0.0 <3.0.19
    Fixed in
    3.0.19
  • HighCVE-2021-30130GHSA-vf4w-fg7r-5v947 Apr 2021

    Improper Certificate Validation in phpseclib

    Affected
    >=3.0.0 <3.0.7 · <2.0.31
    Fixed in
    2.0.31, 3.0.7

Is your phpseclib/phpseclib version vulnerable?

Which of your client projects still run an old phpseclib/phpseclib?

NPMscan reads the composer.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other Composer packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the Composer registry.