CVE-2026-32935: Phpseclib/phpseclib Phpseclib's AES-CBC Unpadding Susceptible To Vulnerability

HIGH
Advisory Identifier: GHSA-94g3-g5v7-q4jg
CWE-208
Published
Advisory Summary

CVE-2026-32935 is a HIGH phpseclib's aes-cbc unpadding susceptible to vulnerability (CWE-208: Observable Timing Discrepancy) affecting Phpseclib/phpseclib libraries in the Packagist ecosystem. The issue involves phpseclib's aes-cbc unpadding susceptible to padding oracle timing attack. Remediation is available by upgrading affected packages to version 3.0.50, 2.0.52, 1.0.27.

CVE-2026-32935 at a Glance

CVE Identifier CVE-2026-32935
GHSA Identifier GHSA-94g3-g5v7-q4jg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product Phpseclib/phpseclib
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-32935

To remediate this vulnerability, upgrade all affected Phpseclib/phpseclib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

phpseclib/phpseclib fixed: 3.0.50
Upgrade phpseclib/phpseclib to 3.0.50
phpseclib/phpseclib fixed: 2.0.52
Upgrade phpseclib/phpseclib to 2.0.52
phpseclib/phpseclib fixed: 1.0.27
Upgrade phpseclib/phpseclib to 1.0.27
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for phpseclib/phpseclib

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-32935, inspect your project dependencies for Phpseclib/phpseclib:

inspect dependencies for phpseclib/phpseclib

Analyze the terminal output to locate any version of Phpseclib/phpseclib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.50), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where 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. In Phpseclib/phpseclib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Those using AES in CBC mode may be susceptible to a padding oracle timing attack. ### Patches https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788 ### Workarounds Use AES in CTR, CFB or OFB modes ### References https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788

CVE-2026-32935 Affected Phpseclib/phpseclib Versions

3 component(s)
Fixed Versions:
3.0.502.0.521.0.27
Product / Package Ecosystem Affected Versions Fixed Version
phpseclib/phpseclib
Packagist
≥ 3.0.0
< 3.0.50
3.0.50
phpseclib/phpseclib
Packagist
≥ 2.0.0
< 2.0.52
2.0.52
phpseclib/phpseclib
Packagist
≥ 0.1.1
< 1.0.27
1.0.27

References

Frequently Asked Questions

What is CVE-2026-32935?
CVE-2026-32935 is a security vulnerability in Phpseclib/phpseclib involving phpseclib's AES-CBC unpadding susceptible to padding oracle timing attack under CWE-208: Observable Timing Discrepancy.
Which Phpseclib/phpseclib versions are affected?
Affected versions include releases prior to 3.0.50, 2.0.52, 1.0.27 across affected packages: phpseclib/phpseclib.
What version fixes CVE-2026-32935?
Upgrading to 3.0.50, 2.0.52, 1.0.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpseclib/phpseclib affected?
Yes, phpseclib/phpseclib is affected in releases prior to 3.0.50, 2.0.52, 1.0.27. Upgrade your dependency to 3.0.50, 2.0.52, 1.0.27 or later.
What CWE is associated with CVE-2026-32935?
CVE-2026-32935 is classified under CWE-208: Observable Timing Discrepancy (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.).
How can I check Packagist dependencies for CVE-2026-32935?
Run the dependency tree command: 'inspect dependencies for phpseclib/phpseclib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-94g3-g5v7-q4jg",
  "modified" : "2026-05-08T15:18:13Z",
  "published" : "2026-03-19T16:42:18Z",
  "aliases" : [ "CVE-2026-32935" ],
  "summary" : "phpseclib's AES-CBC unpadding susceptible to padding oracle timing attack",
  "details" : "### Impact\nThose using AES in CBC mode may be susceptible to a padding oracle timing attack.\n\n### Patches\nhttps://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788\n\n### Workarounds\nUse AES in CTR, CFB or OFB modes\n\n### References\nhttps://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpseclib/phpseclib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.50"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.0.49"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpseclib/phpseclib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.52"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.51"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpseclib/phpseclib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.1"
      }, {
        "fixed" : "1.0.27"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.26"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32935"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phpseclib/phpseclib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-19T16:42:18Z",
    "nvd_published_at" : "2026-03-20T03:16:00Z"
  }
}