CVE-2024-27355: phpseclib does not properly limit the ASN1 OID length

Published Mar 1, 2024
·
Updated

Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-f2qx-66wf-wvvx. This link is maintained to preserve external references.

Original 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. When processing the ASN.1 object identifier of a certificate, a sub identifier may be provided that leads to a denial of service (CPU consumption for decodeOID).

Other sources

Impact Any application using that loads untrusted ASN1 files (eg. X509 certificates, RSA PKCS8 private or public keys, etc).

Patches https://github.com/phpseclib/phpseclib/commit/e32531001b4d62c66c3d824ccef54ffad835eb59

Workarounds No.

Resources https://github.com/phpseclib/phpseclib/commit/e32531001b4d62c66c3d824ccef54ffad835eb59 https://www.usenix.org/system/files/conference/usenixsecurity25/sec25cycle1-prepub-599-shi-bing.pdf

— GitHub

phpseclib does not properly limit the ASN1 OID length

— Packagist

Affected Software

24 affected componentsFixes available
composer/phpseclib/phpseclib>=1.0.0<1.0.23
1.0.23
composer/phpseclib/phpseclib>=2.0.0<2.0.47
2.0.47
composer/phpseclib/phpseclib>=3.0.0<3.0.36
3.0.36
phpseclib phpseclib>=1.0.0<1.0.23
phpseclib phpseclib>=2.0.0<2.0.47
phpseclib phpseclib>=3.0.0<3.0.36
Debian Debian Linux=10.0
composer/phpseclib/phpseclib>=0.1.1<=1.0.22
1.0.23
composer/phpseclib/phpseclib>=3.0.0<=3.0.35
3.0.36
composer/phpseclib/phpseclib>=2.0.0<=2.0.46
2.0.47
composer/phpseclib/phpseclib>=3.0.0, <3.0.36
3.0.36
composer/phpseclib/phpseclib>=2.0.0, <2.0.47
2.0.47
composer/phpseclib/phpseclib>=1.0.0, <1.0.23
1.0.23
debian/php-phpseclib<2.0.42-1+deb12u2
2.0.42-1+deb12u2
debian/php-phpseclib<2.0.47-1
2.0.47-1
debian/php-phpseclib<2.0.47-1
2.0.47-1
debian/php-phpseclib3<3.0.19-1+deb12u3
3.0.19-1+deb12u3
debian/php-phpseclib3<3.0.36-1
3.0.36-1
debian/php-phpseclib3<3.0.36-1
3.0.36-1
debian/phpseclib<1.0.20-1+deb12u2
1.0.20-1+deb12u2
debian/phpseclib<1.0.23-1
1.0.23-1
debian/php-phpseclib
2.0.42-1+deb12u52.0.42-1+deb12u32.0.48-3+deb13u32.0.48-3+deb13u12.0.55-12.0.56-1
debian/php-phpseclib3
3.0.19-1+deb12u63.0.19-1+deb12u43.0.43-2+deb13u33.0.43-2+deb13u13.0.57-13.0.58-1
debian/phpseclib
1.0.20-1+deb12u51.0.20-1+deb12u31.0.23-6+deb13u31.0.23-6+deb13u11.0.31-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/phpseclib/phpseclib to a version that resolves this vulnerability.

    Fixed in 1.0.23
  2. Upgrade

    Upgrade composer/phpseclib/phpseclib to a version that resolves this vulnerability.

    Fixed in 2.0.47
  3. Upgrade

    Upgrade composer/phpseclib/phpseclib to a version that resolves this vulnerability.

    Fixed in 3.0.36
  4. Upgrade

    Upgrade debian/php-phpseclib to a version that resolves this vulnerability.

    Fixed in 2.0.42-1+deb12u2
  5. Upgrade

    Upgrade debian/php-phpseclib to a version that resolves this vulnerability.

    Fixed in 2.0.47-1
  6. Upgrade

    Upgrade debian/php-phpseclib3 to a version that resolves this vulnerability.

    Fixed in 3.0.19-1+deb12u3
  7. Upgrade

    Upgrade debian/php-phpseclib3 to a version that resolves this vulnerability.

    Fixed in 3.0.36-1
  8. Upgrade

    Upgrade debian/phpseclib to a version that resolves this vulnerability.

    Fixed in 1.0.20-1+deb12u2
  9. Upgrade

    Upgrade debian/phpseclib to a version that resolves this vulnerability.

    Fixed in 1.0.23-1
  10. Upgrade

    Upgrade debian/php-phpseclib to a version that resolves this vulnerability.

    Fixed in 2.0.42-1+deb12u5Fixed in 2.0.42-1+deb12u3Fixed in 2.0.48-3+deb13u3Fixed in 2.0.48-3+deb13u1Fixed in 2.0.55-1Fixed in 2.0.56-1
  11. Upgrade

    Upgrade debian/php-phpseclib3 to a version that resolves this vulnerability.

    Fixed in 3.0.19-1+deb12u6Fixed in 3.0.19-1+deb12u4Fixed in 3.0.43-2+deb13u3Fixed in 3.0.43-2+deb13u1Fixed in 3.0.57-1Fixed in 3.0.58-1
  12. Upgrade

    Upgrade debian/phpseclib to a version that resolves this vulnerability.

    Fixed in 1.0.20-1+deb12u5Fixed in 1.0.20-1+deb12u3Fixed in 1.0.23-6+deb13u3Fixed in 1.0.23-6+deb13u1Fixed in 1.0.31-1
  13. Upgrade

    Upgrade phpseclib to a version that resolves this vulnerability.

    Fixed in 1.0.23
  14. Upgrade

    Upgrade phpseclib to a version that resolves this vulnerability.

    Fixed in 2.0.47
  15. Upgrade

    Upgrade phpseclib to a version that resolves this vulnerability.

    Fixed in 3.0.36

Event History

Mar 1, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·11:15 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·11:15 PM
DescriptionSeverityAffected Software
Mar 2, 2024
Advisory Published
via GitHub·12:31 AM
Data Sourced
via GitHub·12:31 AM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·12:31 AM
DescriptionSeverityAffected Software
May 8, 2026
Withdrawn
via GitHub·06:24 PM
Advisory Published
via GitHub·06:24 PM

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-27355?

CVE-2024-27355 is classified as a denial of service vulnerability due to excessive CPU consumption.

2

How do I fix CVE-2024-27355?

To mitigate CVE-2024-27355, upgrade to phpseclib version 1.0.23, 2.0.47, or 3.0.36.

3

What versions of phpseclib are affected by CVE-2024-27355?

CVE-2024-27355 affects phpseclib versions before 1.0.23, 2.0.47, and 3.0.36.

4

What is the cause of CVE-2024-27355?

CVE-2024-27355 is caused by improper processing of the ASN.1 object identifier of a certificate.

5

Can CVE-2024-27355 lead to system exploitation?

CVE-2024-27355 does not lead to system exploitation but can result in service interruption due to high CPU usage.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203