CVE-2026-32935
Received Received - Intake
Padding Oracle Timing Attack in phpseclib AES-CBC Mode

Publication date: 2026-03-20

Last updated on: 2026-03-23

Assigner: GitHub, Inc.

Description
phpseclib is a PHP secure communications library. Projects using versions 1.0.26 and below, 2.0.0 through 2.0.51, and 3.0.0 through 3.0.49 are vulnerable to a to padding oracle timing attack when using AES in CBC mode. This issue has been fixed in versions 1.0.27, 2.0.52 and 3.0.50.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-20
Last Modified
2026-03-23
Generated
2026-05-07
AI Q&A
2026-03-20
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
phpseclib phpseclib to 1.0.27 (exc)
phpseclib phpseclib From 2.0.0 (inc) to 2.0.52 (exc)
phpseclib phpseclib From 3.0.0 (inc) to 3.0.50 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-208 Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-32935 is a vulnerability in the phpseclib PHP secure communications library affecting versions up to 1.0.26, 2.0.51, and 3.0.49. It involves a padding oracle timing attack when using AES encryption in CBC mode. Specifically, the unpadding process leaks timing information due to how the padding length is validated, allowing attackers to infer details about the plaintext by measuring operation timing differences.

The issue arises because the unpadding function does not run in constant time, enabling attackers to exploit timing discrepancies during the padding validation step. This vulnerability is addressed by modifying the unpadding function to perform checks in constant time, preventing timing side-channel attacks.


How can this vulnerability impact me? :

This vulnerability can impact you by compromising the confidentiality of data encrypted using phpseclib with AES in CBC mode. An attacker can exploit timing differences during the unpadding process to gain information about the plaintext, potentially exposing sensitive information.

The attack is network-based and requires no privileges or user interaction, but it has a high complexity. The vulnerability does not affect data integrity or system availability.

Mitigation involves updating to patched versions of phpseclib (1.0.27, 2.0.52, or 3.0.50) or using AES encryption modes other than CBC, such as CTR, CFB, or OFB.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability is a padding oracle timing attack affecting the unpadding operation in AES CBC mode within phpseclib. Detection involves identifying usage of vulnerable phpseclib versions (1.0.26 and below, 2.0.0 through 2.0.51, and 3.0.0 through 3.0.49) and monitoring for timing discrepancies during AES CBC decryption operations.

Since the vulnerability is related to timing side-channels in the unpadding function, direct detection via network commands is challenging. However, you can detect vulnerable versions by checking the installed phpseclib package version.

  • Check phpseclib version in your project by running: `composer show phpseclib/phpseclib` or inspecting the version in your dependency manager.
  • Search your codebase for usage of AES in CBC mode with phpseclib to identify potential vulnerable cryptographic operations.

For network detection, monitoring for unusual timing patterns or anomalous requests exploiting AES CBC decryption might require custom timing analysis tools or intrusion detection systems configured to detect timing attacks, but no specific commands are provided in the resources.


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation is to update phpseclib to a patched version where the vulnerability is fixed.

  • Upgrade phpseclib to version 1.0.27 or later, 2.0.52 or later, or 3.0.50 or later.

If immediate upgrade is not possible, consider avoiding the use of AES in CBC mode and instead use other AES modes that are not vulnerable to this timing attack.

  • Use AES modes such as CTR (Counter), CFB (Cipher Feedback), or OFB (Output Feedback) instead of CBC.

These steps reduce the risk of attackers exploiting timing discrepancies during the unpadding operation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart