Vulnerability · Published Mar 1, 2024 · Assigned by mitre
CVE-2024-27354
High 7.5
In plain English
A high-severity uncontrolled resource consumption in the php-phpseclib package (Debian). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 49% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | php-phpseclib | 2.0.42-1+deb12u2 | DEBIAN-CVE-2024-27354 |
| Debian:13 | php-phpseclib | 2.0.47-1 | DEBIAN-CVE-2024-27354 |
| Debian:14 | php-phpseclib | 2.0.47-1 | DEBIAN-CVE-2024-27354 |
| Debian:12 | php-phpseclib3 | 3.0.19-1+deb12u3 | DEBIAN-CVE-2024-27354 |
| Debian:13 | php-phpseclib3 | 3.0.36-1 | DEBIAN-CVE-2024-27354 |
| Debian:14 | php-phpseclib3 | 3.0.36-1 | DEBIAN-CVE-2024-27354 |
| Debian:12 | phpseclib | 1.0.20-1+deb12u2 | DEBIAN-CVE-2024-27354 |
| Debian:13 | phpseclib | 1.0.23-1 | DEBIAN-CVE-2024-27354 |
| Packagist | phpseclib/phpseclib | 3.0.36 | GHSA-2528-jw5q-ww88 |
| Packagist | phpseclib/phpseclib | 2.0.47 | GHSA-2528-jw5q-ww88 |
| Packagist | phpseclib/phpseclib | 1.0.23 | GHSA-2528-jw5q-ww88 |
| Ubuntu:22.04:LTS | phpseclib | 1.0.20-1+deb12u3build0.22.04.1 | UBUNTU-CVE-2024-27354 |
| Ubuntu:22.04:LTS | phpseclib | 1.0.20-1+deb12u3build0.22.04.1 | USN-8769-1 |
Affected products (as reported)
Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Math/PrimeField.php#L49
- https://gist.github.com/katzj/ee72f3c2a00590812b2ea3c0c8890e0b
- [debian-lts-announce] 20240305 [SECURITY] [DLA 3749-1] phpseclib security update mailing-list
- [debian-lts-announce] 20240305 [SECURITY] [DLA 3750-1] php-phpseclib security update mailing-list