CVE-2024-27355: phpseclib OID Length Guardrails Vulnerability

phpseclib/phpseclib Updated 08 May 2026

Summary

08/05/2026
Yes i
High
7.5

CVE-2024-27355: phpseclib guardrails needed on OID length. Affects phpseclib/phpseclib across 3 version ranges.

>= 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 or 3.0.36, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2024-27355 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

phpseclib is a popular open-source library for secure communications in PHP. It provides a range of cryptographic functionalities, including support for various encryption algorithms, key management, and secure data transmission. However, it has been found to have vulnerabilities related to the handling of untrusted ASN1 files, such as X509 certificates and RSA keys, which could lead to security breaches if not addressed.

Vulnerability Detail

The vulnerability arises from insufficient guardrails on Object Identifier (OID) lengths when processing untrusted ASN1 files. This can lead to potential denial-of-service attacks or other security issues, as attackers may exploit this weakness to manipulate the parsing of these files. The vulnerability affects multiple versions of phpseclib, specifically those prior to 2.0.47, 3.0.36, and 1.0.23, making it critical for users to update to the patched versions.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.1.1, < 1.0.23 1.0.23
    composer require phpseclib/phpseclib:1.0.23
  • >= 2.0.0, < 2.0.47 2.0.47
    composer require phpseclib/phpseclib:2.0.47
  • >= 3.0.0, < 3.0.36 3.0.36
    composer require phpseclib/phpseclib:3.0.36

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

No workarounds are available for this vulnerability. The only effective solution is to update to the patched versions mentioned above.

Conclusion

CVE-2024-27355 represents a significant security risk for applications using vulnerable versions of phpseclib. It is crucial for developers to update to the latest patched versions to mitigate potential threats associated with untrusted ASN1 file processing.

See every vulnerability recorded for phpseclib/phpseclib →

Share this vulnerability

FAQ

CVE-2024-27355 is a vulnerability in the phpseclib library that relates to insufficient guardrails on OID lengths when processing untrusted ASN1 files.

The affected versions include phpseclib versions prior to 2.0.47, 3.0.36, and 1.0.23.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The vulnerability can lead to denial-of-service attacks or other security issues due to improper handling of ASN1 files.

The CVSS score for CVE-2024-27355 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for phpseclib/phpseclib.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.1.1, < 1.0.23 1.0.23
    composer require phpseclib/phpseclib:1.0.23
  • >= 2.0.0, < 2.0.47 2.0.47
    composer require phpseclib/phpseclib:2.0.47
  • >= 3.0.0, < 3.0.36 3.0.36
    composer require phpseclib/phpseclib:3.0.36

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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