Phpseclib
CVE-2026-32935
HIGH
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V14 - Configuration Dependency management, component inventory
|
| Impact | Risk assessment is complicated by the absence of CVSS vector, EPSS score, and KEV status data, which prevents quantitative prioritization against other vulnerabilities. However, several factors indicate moderate to high real-world risk: (1) The attack is network-observable and does not require authentication or user interaction, (2) Timing-based side-channel attacks are well-understood and tooling exists in the cryptographic community, (3) The library is widely used in PHP applications handling sensitive data, and (4) The presence of patched versions (1.0.27, 2.0.52, 3.0.50) indicates the vendor confirmed the issue as genuine. The attack complexity is moderate—it requires precise timing measurements and multiple requests—but is automatable. Organizations relying on phpseclib for AES-CBC encryption of confidential data (passwords, tokens, PII) should prioritize upgrading. For applications using other cipher modes or encryption libraries, risk is lower. |
| Exploit ScenarioDerived | An attacker observes encrypted authentication tokens or session data transmitted by a PHP web application using vulnerable phpseclib AES-CBC. By sending thousands of specially crafted decryption requests and measuring response times, the attacker can infer which padding configurations are valid, gradually recovering plaintext bytes of the encrypted token. Over the course of minutes to hours depending on network stability, the attacker reconstructs the full plaintext without ever obtaining the encryption key, then reuses the leaked token to impersonate users or escalate privileges. No special tools beyond standard HTTP clients and timing measurement (achievable over the internet via statistical analysis) are required. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 20, 2026
phpseclib 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 padding oracle timing attack when using AES in CBC mode, allowing attackers to decrypt sensitive data through cryptanalysis of response timing differences. This information disclosure vulnerability affects any PHP application using the vulnerable phpseclib library for AES-CBC encryption. Although no CVSS score, EPSS data, or confirmed active exploitation (KEV status) are currently available, the presence of a verified fix and security advisory indicates this is a legitimate cryptographic weakness requiring attention.
RemediationAI
Upgrade phpseclib immediately to version 1.0.27, 2.0.52, or 3.0.50 or later depending on your current branch, following the guidance in the GitHub security advisory at https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg. For applications unable to patch immediately, consider switching to authenticated encryption modes (AES-GCM) if possible, or use a higher-level cryptographic library that does not suffer timing side-channels. Additionally, implement network-level defenses such as rate limiting on decryption operations and adding random jitter to response times to reduce timing observability. Conduct an audit of all phpseclib deployments in your infrastructure to identify affected versions and prioritize patches for systems handling sensitive encrypted data.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
phpseclib is a pure PHP cryptographic library providing secure communications functionality including AES encryption. The vulnerability resides in the CBC mode padding validation implementation, which exhibits timing side-channels during decryption—a classic padding oracle weakness classified under CWE-208 (Observable Timing Discrepancy). When decrypting AES-CBC ciphertext, the library's padding verification logic takes measurably different amounts of time depending on whether the padding is valid, leaking information about the plaintext to a network-based attacker who can measure response latency. An attacker can iteratively refine guesses about plaintext bytes by observing timing differences, eventually recovering the original encrypted data without possessing the encryption key.
Know when Phpseclib gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
4DescriptionGitHub Advisory
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.
Executive ViewAI
Organizations using phpseclib should be aware of moderate risk from CVE-2026-32935 rated CVSS 5.9. Exploitation could compromise the security of affected deployments. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: restrict network access and enable monitoring.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)GitHub Advisory
Timing side-channel exposure in phpseclib's pure-PHP X25519 scalar multiplication allows a local observer to recover a r
Math/PrimeField.php in phpseclib 3.x before 3.0.19 has an infinite loop with composite primefields. Rated high severity
phpseclib before 2.0.31 and 3.x before 3.0.7 mishandles RSA PKCS#1 v1.5 signature verification. Rated high severity (CVS
Server-side request forgery in phpseclib's X.509 validation allows unauthenticated network attackers to force the valida
phpseclib's SSH2 packet authentication uses PHP's non-constant-time != operator to compare HMACs, enabling timing-based
Same weakness CWE-208 – Observable Timing Discrepancy
View allSame technique Information Disclosure
View allVendor StatusVendor
Ubuntu
Priority: Medium| Release | Status | Version |
|---|---|---|
| xenial | needs-triage | - |
| bionic | needs-triage | - |
| focal | needs-triage | - |
| jammy | needs-triage | - |
| noble | needs-triage | - |
| questing | needs-triage | - |
| upstream | needs-triage | - |
| Release | Status | Version |
|---|---|---|
| jammy | needs-triage | - |
| noble | needs-triage | - |
| questing | needs-triage | - |
| upstream | needs-triage | - |
| Release | Status | Version |
|---|---|---|
| xenial | needs-triage | - |
| bionic | needs-triage | - |
| focal | needs-triage | - |
| jammy | needs-triage | - |
| noble | needs-triage | - |
| questing | needs-triage | - |
| upstream | needs-triage | - |
GHSA-94g3-g5v7-q4jg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB