Skip to main content

CVE-2024-27354: n/a in n/a

High
VulnerabilityCVE-2024-27354cvecve-2024-27354n-acwe-400
Published: Fri Mar 01 2024 (03/01/2024, 00:00:00 UTC)
Source: CVE
Vendor/Project: n/a
Product: n/a

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.

AI-Powered Analysis

AILast updated: 06/21/2025, 15:21:57 UTC

Technical Analysis

CVE-2024-27354 is a high-severity vulnerability affecting multiple versions of the phpseclib library, specifically versions 1.x prior to 1.0.23, 2.x prior to 2.0.47, and 3.x prior to 3.0.36. Phpseclib is a widely used pure PHP implementation of various cryptographic algorithms and protocols, including support for handling certificates. This vulnerability arises from a denial of service (DoS) condition triggered by an attacker crafting a malformed certificate containing an extremely large prime number. When phpseclib attempts to validate this certificate, it performs a primality check using the isPrime function on the large prime number. Due to the computational complexity of primality testing on such large numbers, this leads to excessive CPU consumption, effectively causing a resource exhaustion DoS. Notably, this issue was introduced as a regression while attempting to fix a previous vulnerability (CVE-2023-27560), indicating a flaw in the patching process. The vulnerability requires no authentication or user interaction and can be exploited remotely over the network by submitting the malicious certificate to an application using the affected phpseclib versions. The CVSS v3.1 base score is 7.5 (high), reflecting the network attack vector, low attack complexity, no privileges or user interaction required, and a high impact on availability. Confidentiality and integrity are not impacted. There are no known exploits in the wild at this time, and no official patches or vendor advisories have been linked yet. However, given phpseclib's widespread use in PHP applications for cryptographic operations, this vulnerability poses a significant risk for denial of service attacks against services relying on it for certificate validation or cryptographic functions.

Potential Impact

For European organizations, the primary impact of CVE-2024-27354 is the potential for denial of service attacks targeting web applications, APIs, or backend services that utilize vulnerable versions of phpseclib for certificate handling or cryptographic operations. Such DoS attacks can lead to service outages, degraded performance, and increased operational costs due to resource exhaustion. Critical infrastructure sectors such as finance, healthcare, government, and telecommunications that rely on PHP-based applications with phpseclib integration may experience disruptions. Additionally, organizations providing SaaS or cloud services using phpseclib could face customer impact and reputational damage. While the vulnerability does not compromise data confidentiality or integrity, the availability impact can be significant, especially in high-demand environments. The lack of authentication or user interaction requirements means attackers can exploit this remotely and anonymously, increasing the threat surface. Given the ongoing geopolitical tensions and increased cyber threat activity in Europe, threat actors may leverage this vulnerability as part of broader disruption campaigns or ransomware operations that aim to degrade service availability.

Mitigation Recommendations

Identify and inventory all applications and services using phpseclib versions 1.x prior to 1.0.23, 2.x prior to 2.0.47, or 3.x prior to 3.0.36 within your environment. Upgrade phpseclib to the latest patched versions (1.0.23 or later, 2.0.47 or later, 3.0.36 or later) as soon as official patches become available. If immediate upgrade is not possible, implement input validation and filtering to detect and block certificates containing abnormally large prime numbers or malformed certificate structures before they reach the phpseclib processing logic. Apply rate limiting and anomaly detection on certificate submission endpoints to mitigate potential DoS attempts by limiting the number of certificate validations per client or IP address. Monitor application logs and system resource usage for unusual spikes in CPU consumption related to certificate processing, which may indicate exploitation attempts. Consider deploying Web Application Firewalls (WAFs) with custom rules to detect and block malformed certificate payloads targeting this vulnerability. Engage with software vendors and maintain awareness of updates related to phpseclib to ensure timely patching and mitigation. Conduct penetration testing and security assessments focusing on cryptographic components to identify residual risks related to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2024-02-25T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d984ac4522896dcbf7115

Added to database: 5/21/2025, 9:09:30 AM

Last enriched: 6/21/2025, 3:21:57 PM

Last updated: 8/1/2025, 3:31:21 AM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats