VDB

CVE-2024-27354

CVE-2024-27354 PUBLISHED CVSS 7.5 HIGH

phpseclib: guardrails needed on isPrime and randomPrime

Reported by mitre · Published March 1, 2024

phpseclib/phpseclib is fixed in 3.0.36, 2.0.47 and 1.0.23 (Packagist)

An issue was discovered in phpseclib 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36. An attacker can construct a malformed certificate containing an extremely large prime to cause a denial of service (CPU consumption for an isPrime primality check). NOTE: this issue was introduced when attempting to fix CVE-2023-27560.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
phpseclib/phpseclibPackagist3.0.36, 2.0.47, 1.0.23
1xphpseclib1.0.23

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
n/an/an/a
phpseclib1x0
n/an/a*
phpseclib3x0
phpseclibphpseclib0.1.1, 2.0.0, 3.0.0
phpseclib2x0

Timeline

  • Feb 29, 2024 GitHub Gist PoC
  • Mar 1, 2024 CVE Published
  • Mar 2, 2024 EPSS Score (30 in total, the first dated here)
  • Mar 2, 2024 PoC Published (3 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (8 in total, the first dated here)
  • Sep 15, 2025 CVE Updated
  • Mar 17, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-27354
vulnetix vdb fixes CVE-2024-27354

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-27354/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›