Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft X.509 certificate with malicious AIA caIssuers URL
-
DeliverySubmit certificate to phpseclib-validating PHP application
-
ExploitvalidateSignature() invokes testForIntermediate()
-
ExecutionfetchURL() opens server-side connection to attacker-specified internal host
-
PersistProbe cloud metadata or internal services
-
ImpactHarvest credentials or map internal network
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application invokes phpseclib's X509::validateSignature() - or any code path that calls it - on a certificate supplied or influenced by the attacker, such as mutual TLS client certificates, certificate chains received from external peers, or user-submitted PEM/DER files processed for validation. The application must run an unpatched phpseclib version (1.x ≤ 1.0.29, 2.x ≤ 2.0.54, or 3.x ≤ 3.0.53) and must not have explicitly set disable_url_fetch to true (it defaults to false, so most deployments are exposed without any additional misconfiguration). No authentication to the vulnerable application is required - the CVSS PR:N confirms this. Exploitation is bounded to SSRF impact: the attacker can cause the server to open TCP connections to arbitrary hosts and ports and may retrieve responses if the application surfaces validation error details, but direct code execution is not indicated by available data. Blind SSRF scenarios (no response reflection) still allow internal port scanning and metadata endpoint probing. |
| Impact | The CVSS 3.1 score of 5.8 (AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N) accurately captures the scope-changed nature of the vulnerability - the SSRF allows pivoting to internal systems beyond the vulnerable server - but the medium severity score may understate real-world priority for cloud-hosted deployments. The Scope:Changed metric is key: successful exploitation can reach AWS/GCP/Azure metadata endpoints (169.254.169.254), potentially exposing IAM credentials, instance identity tokens, or internal API surfaces, turning a C:L rating into a high-impact secondary breach. Attack Complexity is Low and no privileges are required since any party who can submit a certificate for validation can trigger the flaw - no special knowledge or timing is needed. EPSS data was not provided in the input and exploitation probability cannot be quantified. No CISA KEV listing exists; active exploitation is not confirmed. The advisory contains precise source code references (file paths, line numbers, code snippets), making this straightforward to reproduce, and the insecure-default nature means no misconfiguration is required - the full install base of unpatched versions is exposed. The confidentiality impact is limited to SSRF probing rather than direct data exfiltration unless the application reflects fetched content, which constrains but does not eliminate real-world severity. |
| Exploit ScenarioDerived | An attacker submits a crafted X.509 client certificate - containing a malicious AIA caIssuers URL pointing to the AWS EC2 metadata endpoint (http://169.254.169.254/latest/meta-data/iam/security-credentials/) - to a PHP web application that calls phpseclib's X509::validateSignature() to authenticate the certificate. Without any authentication to the application, phpseclib silently fetches the attacker-specified URL from the server's network context, potentially returning IAM role credentials to the attacker if the application reflects validation diagnostics or errors containing the fetched content. No standalone public exploit tool was referenced in the advisory, but the exact source file paths and code snippets published in GHSA-m557-wrgg-6rp4 make reproducing the trigger trivial. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 22, 2026
Server-side request forgery in phpseclib's X.509 validation allows unauthenticated network attackers to force the validating server to open arbitrary outbound connections to attacker-controlled hosts, including internal loopback addresses (127.0.0.1) and cloud metadata endpoints (169.254.169.254). The flaw exists because X509::validateSignature() unconditionally fetches URLs embedded in the Authority Information Access extension of untrusted certificates with no blocklist or destination filtering - and this behavior is enabled by default across all three maintained release branches. No CISA KEV listing exists at time of analysis, and no weaponized public exploit was referenced, though the GitHub advisory provides exact file and line references making the trigger path immediately reproducible.
RemediationAI
Upgrade phpseclib to the patched release corresponding to the branch in use: 1.0.30 for the 1.x branch, 2.0.55 for the 2.x branch, or 3.0.54 for the 3.x branch, as confirmed by the vendor advisory at https://github.com/phpseclib/phpseclib/security/advisories/GHSA-m557-wrgg-6rp4. If an immediate upgrade is not feasible, explicitly set the disable_url_fetch flag to true on all X509 instances before calling validateSignature() - this disables AIA-driven outbound fetching, but as a trade-off, any certificate chain that requires fetching intermediate CAs at runtime will fail validation, necessitating pre-loading all expected intermediate certificates into the trust store manually. As a defense-in-depth layer independent of patching, enforce egress filtering on the PHP application host to block outbound connections to RFC-1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.0/8), and link-local ranges (169.254.0.0/16); this limits SSRF blast radius against internal infrastructure and cloud metadata services but does not prevent SSRF to external attacker-controlled hosts.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
phpseclib (composer package phpseclib/phpseclib) is a pure-PHP cryptographic library providing TLS, SSH, and X.509 certificate operations. The root cause (CWE-918, Server-Side Request Forgery) lies in the certificate chain-building logic: when validateSignatureCountable() cannot find a trusted CA for the certificate under validation, it calls testForIntermediate(), which reads the caIssuers field from the certificate's Authority Information Access (AIA) OID extension and passes that value directly to the internal fetchURL() method. The URL originates entirely from attacker-controlled certificate content and is never sanitized - no blocklist for RFC-1918 ranges, loopback, link-local (169.254.0.0/16), or restricted ports exists in fetchURL(). The disable_url_fetch flag that would suppress this behavior defaults to false, meaning every phpseclib deployment validating untrusted certificates is exposed unless explicitly hardened. Affected CPE: cpe:2.3:a:phpseclib:phpseclib:*:*:*:*:*:*:*:* across branches 1.x (≤1.0.29), 2.x (≤2.0.54), and 3.x (≤3.0.53), with the 4.0 development line also confirmed vulnerable per commit 74ada1a6 in GHSA-m557-wrgg-6rp4.
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
AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
Network-delivered crafted certificate, no auth or interaction required (PR:N/UI:N); scope change (S:C) reflects SSRF reaching internal systems; confidentiality limited to probing, not direct exfiltration.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
phpseclib is a PHP secure communications library. From 0.1.1 until 1.0.30, 2.0.55, and 3.0.54, when an application validates an untrusted X.509 certificate with phpseclib, X509::validateSignature() reads a URL out of that certificate's Authority Information Access (AIA) extension and connects to it. Attacker who supplies certificate fully controls host, port, and path of that connection. URL fetching is enabled by default, and no destination is blocked. An unauthenticated attacker can therefore make a validating server open connections to internal hosts and ports it should never reach, for example loopback 127.0.0.1, cloud metadata address 169.254.169.254, and internal-only services. This is a server-side request forgery (SSRF) caused by an insecure default. This vulnerability is fixed in 1.0.30, 2.0.55, and 3.0.54.
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
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
Timing side-channel exposure in phpseclib's pure-PHP X25519 scalar multiplication allows a local observer to recover a r
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 t
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
phpseclib's SSH2 packet authentication uses PHP's non-constant-time != operator to compare HMACs, enabling timing-based
EUVD-2026-38348
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB