Skip to content
Fencer Intel
high 7.5

CVE-2024-27354 json

phpseclib: guardrails needed on isPrime and randomPrime

published 2y ago modified 4mo ago also GHSA-2528-jw5q-ww88 , EUVD-2024-0936

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 49%
public exploits
0
none known

Summary

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.

Patch / fix

  • packagist phpseclib/phpseclib 1.0.23, 2.0.47, 3.0.36
  • phpseclib 1x 1.0.23
  • phpseclib 2x 2.0.47
  • phpseclib 3x 3.0.36
  • phpseclib Debian 12 1.0.20-1+deb12u2
  • phpseclib Debian 13 1.0.23-1
  • php-phpseclib Debian 12 2.0.42-1+deb12u2
  • php-phpseclib Debian 14, Debian 13 2.0.47-1
  • php-phpseclib3 Debian 12 3.0.19-1+deb12u3
  • php-phpseclib3 Debian 14, Debian 13 3.0.36-1

debian advisories DEBIAN-CVE-2024-27354

  • phpseclib Ubuntu 22.04 LTS 1.0.20-1+deb12u3build0.22.04.1
  • phpseclib Ubuntu Pro 16.04 LTS 1.0.1-3ubuntu0.1+esm1
  • phpseclib Ubuntu Pro 18.04 LTS 1.0.9-1ubuntu0.1~esm1
  • phpseclib Ubuntu Pro 20.04 LTS 1.0.18-2ubuntu0.1~esm1
  • phpseclib Ubuntu Pro 22.04 LTS 1.0.20-1ubuntu0.1~esm1
  • php-phpseclib Ubuntu Pro 16.04 LTS 2.0.1-1ubuntu0.1~esm2
  • php-phpseclib Ubuntu Pro 18.04 LTS 2.0.9-1ubuntu0.1~esm2
  • php-phpseclib Ubuntu Pro 20.04 LTS 2.0.23-2ubuntu0.1~esm2

ubuntu advisories UBUNTU-CVE-2024-27354

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2024-27354 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-27354 updated

php-phpseclib: denial of service

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
partial
Assessed
2y ago

Exploit prediction

0.60% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-11).

CVSS scores

assigned by version score vector
CISA ADP 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
packagist phpseclib/phpseclib
>=0.1.1, <1.0.23
>=2.0.0, <2.0.47
>=3.0.0, <3.0.36
1.0.23
2.0.47
3.0.36

Affected products

  • phpseclib 1x
  • phpseclib 2x
  • phpseclib 3x

Classification

Weakness
  • CWE-400 Uncontrolled Resource Consumption

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.