# phpseclib: guardrails needed on isPrime and randomPrime

Advisory record · `GHSA-2528-jw5q-ww88`

- **Identifiers:** `GHSA-2528-jw5q-ww88` · `CVE-2024-27354`
- **State:** Confirmed
- **Severity:** CVSS 7.5 High
- **Critical:** No
- **Weakness (CWE):** [CWE-400](https://cwe.mitre.org/data/definitions/400.html)
- **Tags:** [Denial of service](https://agentprime.io/advisories/tag/dos.md)
- **Published:** 6 May 2026
- **Updated:** 6 May 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 6 May 2026, 17:57 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `phpseclib/phpseclib` (Packagist): 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`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> phpseclib versions from 0.1.1 before 1.0.23, from 2.0.0 before 2.0.47, and from 3.0.0 before 3.0.36 are affected. The source gives few details about the attack: it says the issue concerns generating a prime and testing the primality of a number, and it links a research paper, but it does not describe what an attacker can do. Upgrade to 1.0.23, 2.0.47, or 3.0.36, depending on the release branch in use.

Written 13 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.5 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`, from GitHub Advisory Database

- **CISA KEV:** Not listed.
- **EPSS:** 0.0060, the 49th percentile, on 15 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:03 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-hg35-mp25-qf6h)

## Sources

- [GitHub Advisory Database: GHSA-2528-jw5q-ww88](https://github.com/advisories/GHSA-2528-jw5q-ww88)
- [OSV: GHSA-2528-jw5q-ww88](https://osv.dev/vulnerability/GHSA-2528-jw5q-ww88)
- <https://github.com/phpseclib/phpseclib/security/advisories/GHSA-2528-jw5q-ww88>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-27354>
- <https://github.com/phpseclib/phpseclib/commit/2870c8fab3f132d2ed40a66c97a36fe5ab625698>
- <https://github.com/phpseclib/phpseclib/commit/ad5dbdf2129f5e0fb644637770b7f33de8ca8575>
- <https://github.com/phpseclib/phpseclib/commit/c55b75199ec8d12cec6eadf6da99da4a3712fe56>
- <https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/phpseclib/phpseclib/CVE-2024-27354.yaml>
- <https://github.com/phpseclib/phpseclib>
- <https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49>
- <https://lists.debian.org/debian-lts-announce/2024/03/msg00002.html>
- <https://lists.debian.org/debian-lts-announce/2024/03/msg00003.html>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-2528-jw5q-ww88>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-2528-jw5q-ww88/>. Everything for agents: <https://agentprime.io/llms.txt>.
