Denial of Service Vulnerability in phpseclib: ASN.1 Object Identifier Processing

php-phpseclib Updated 02 Oct 2025

Summary

01/03/2024
N/A
Yes i
Unrated
Not published

CVE-2024-27355: 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. Affects php-phpseclib across 2 version ranges.

< 2.0.30-2+deb11u2 < 86990d518f4434719271fadd112d34b20208f3a9

Fixed in 2.0.30-2+deb11u2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

phpseclib is a popular open-source library for secure communications in PHP, providing various cryptographic functionalities such as encryption, decryption, and secure key management. The library is widely used in applications requiring secure data transmission. However, certain versions of phpseclib are vulnerable to a denial of service attack due to improper handling of ASN.1 object identifiers in certificates, which can lead to excessive CPU consumption during processing.

Vulnerability Detail

An issue was discovered in phpseclib versions 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36. The vulnerability arises when the library processes the ASN.1 object identifier of a certificate. A sub-identifier may be provided that causes the decodeOID function to consume excessive CPU resources, leading to a denial of service. This can be exploited by an attacker to disrupt the availability of applications relying on phpseclib for secure communications.

How To Fix

Minimum fixed version

2.0.30-2+deb11u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-phpseclib

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If an immediate upgrade is not possible, consider implementing rate limiting on the input to the ASN.1 processing functions to mitigate the impact of potential denial of service attacks. This can help control the CPU usage by limiting the number of requests processed in a given timeframe.

Conclusion

The CVE-2024-27355 vulnerability in phpseclib poses a significant risk of denial of service due to improper handling of ASN.1 object identifiers. It is crucial for users of affected versions to upgrade to the patched releases to ensure the security and availability of their applications. Implementing workarounds such as rate limiting can provide temporary relief until an upgrade is feasible.

See every vulnerability recorded for php-phpseclib →

Share this vulnerability

FAQ

The vulnerability can lead to denial of service by consuming excessive CPU resources, potentially disrupting the availability of applications using phpseclib.

Affected versions include phpseclib 1.x before 1.0.23, 2.x before 2.0.47, and 3.x before 3.0.36.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

Yes, implementing rate limiting on the input to ASN.1 processing functions can help control CPU usage and mitigate the impact of the vulnerability.

More information can be found in the CVE details and the official phpseclib repository on GitHub.

Related vulnerabilities

Recent vulnerabilities recorded for php-phpseclib.

How To Fix

Minimum fixed version

2.0.30-2+deb11u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade php-phpseclib

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback