Jun 16, 2026·6 min read·24 visits
An insecure default configuration in phpseclib enables dynamic retrieval of Certificate Authority certificates via Authority Information Access (AIA) extensions. Because these target URLs are extracted directly from user-supplied certificates and processed without destination validation, attackers can initiate arbitrary outbound GET requests to internal networks and cloud metadata servers.
The PHP Secure Communications Library (phpseclib) contains a Server-Side Request Forgery (SSRF) vulnerability due to an insecure default implementation of Authority Information Access (AIA) certificate chasing. This flaw allows remote, unauthenticated attackers to coerce applications validating user-supplied X.509 certificates into generating arbitrary outbound HTTP requests to internal networks or local interfaces.
The PHP Secure Communications Library (phpseclib) is a pure-PHP implementation of cryptographic and public-key infrastructure primitives. Within its X.509 validation module, File/X509.php, the library supports dynamic path validation to construct complete certificate trust chains. If a validated certificate is signed by an intermediate certificate authority that is not present in the local trust store, the library tries to retrieve the missing certificate dynamically.
This behavior, defined as Authority Information Access (AIA) Chasing under RFC 4325, parses the id-pe-authorityInfoAccess extension inside the certificate to locate the parent CA URI. When an application parses an untrusted certificate containing this extension, phpseclib extracts the URI specified in the id-ad-caIssuers access method and issues an HTTP GET request to download the issuer's certificate.
However, because dynamic AIA chasing was enabled by default without destination validation, the implementation introduces a Server-Side Request Forgery (SSRF) vulnerability. An attacker capable of submitting or uploading a crafted certificate to an application using phpseclib can fully control the destination host, port, and query string of the resulting outbound HTTP request. The lack of destination restrictions means that the server can be forced to connect to internal systems, loopback interfaces, or cloud metadata endpoints.
The root cause of GHSA-m557-wrgg-6rp4 is a structural vulnerability arising from three compounding deficiencies: input trust issues, unsafe default behavior, and a lack of egress verification. The primary failure is the direct ingestion and parsing of unvalidated metadata from untrusted sources. Because the id-pe-authorityInfoAccess extension resides within the certificate body itself, any attacker can specify an arbitrary URL during certificate generation.
During signature evaluation, the validation pipeline triggers testForIntermediate() to find parent certificates. The library parses the certificate's extensions, extracts the value of the uniformResourceIdentifier inside the AIA structure, and passes it directly to the static method fetchURL(). No validation is performed on the host or scheme before this transition.
Finally, the fetchURL() method uses PHP's native fsockopen() function to establish a raw TCP connection to the extracted destination. Prior to the remediation, the static Boolean property $disable_url_fetch was initialized to false by default, activating dynamic HTTP requests out-of-the-box. Furthermore, fetchURL() lacks any destination restrictions or loopback blocklists, leaving the validating server vulnerable to arbitrary intranet interactions.
In affected versions of phpseclib, the dynamic fetching process begins inside File/X509.php when the signature validation engine fails to find a pre-loaded local issuer. The code extracts the target URL and directly initiates a socket handshake via fetchURL() without structural checks on the destination address.
// Vulnerable logic in File/X509.php prior to remediation
private static function fetchURL(string $url): ?string
{
if (self::$disable_url_fetch) { // Default is false
return null;
}
$parts = parse_url($url);
if (!isset($parts['scheme']) || !isset($parts['host'])) {
return null;
}
switch ($parts['scheme']) {
case 'http':
// Open socket to arbitrary host and port controlled by the attacker
$fsock = @fsockopen($parts['host'], $parts['port'] ?? 80, $errno, $errstr, 5);
if (!$fsock) {
return null;
}
$path = ($parts['path'] ?? '/') . (isset($parts['query']) ? '?' . $parts['query'] : '');
fputs($fsock, "GET $path HTTP/1.0\r\n");
fputs($fsock, "Host: $parts[host]\r\n\r\n");
...The remediation introduces a mechanism to intercept and validate or entirely block these outbound requests. In versions 1.0.30, 2.0.55, and 3.0.54, a callback execution pattern is established, allowing developers to define custom egress filtering.
// Remediated logic in File/X509.php introducing callback delegation
private static $url_fetch_callback = null;
public static function setURLFetchCallback(callable $callback)
{
self::$url_fetch_callback = $callback;
}
private static function fetchURL(string $url): ?string
{
if (self::$disable_url_fetch) {
return null;
}
// If a custom validation callback is registered, delegate handling
if (is_callable(self::$url_fetch_callback)) {
return call_user_func(self::$url_fetch_callback, $url);
}
// Standard fallback logic applies restricted handling or blocks fetching
...To exploit GHSA-m557-wrgg-6rp4, an attacker must target an application interface that parses and validates client-supplied certificates, such as WebID-TLS endpoints, S/MIME message processors, or SAML metadata upload endpoints. The attacker prepares a leaf certificate and configures the AIA extension field to point to an internal resource or port.
Once the application processes the certificate and triggers $x509->validateSignature(), phpseclib parses the extension and extracts the target URI. The validation execution triggers an outbound GET request to the target URI regardless of whether the signature eventually fails to validate. This provides an attacker with a blind SSRF capability, allowing them to map internal networks or interact with unauthenticated REST endpoints.
The CVSS v3.1 vector string is evaluated as CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N, yielding a Moderate severity score of 5.8. Because the Scope parameter is set to Changed (S:C), the vulnerability is characterized by its potential to cross security boundaries—such as transitioning from a public web server context to an isolated internal administrative domain.
In cloud environments, attackers can target the link-local address 169.254.169.254. This allows access to Instance Metadata Services (IMDSv1) on AWS, Azure, or Google Cloud, which frequently contain active IAM credentials, configuration parameters, or environment variables. Exposure of these endpoints can lead to full host or cloud account compromise.
In local environments, this flaw facilitates internal network mapping and port scanning. Attackers can execute HTTP requests to local database sockets, Redis instances (127.0.0.1:6379), or internal administrative utilities. Because the HTTP response is parsed solely for X.509 compatibility, direct data extraction is minimized, but request-forgery actions (such as sending command payloads via URI parameters) remain fully viable.
Remediation requires upgrading the phpseclib/phpseclib dependency to the designated secure versions: 1.0.30, 2.0.55, or 3.0.54. These releases introduce the capability to intercept dynamic fetches and implement proper host validation.
If immediate upgrading is not possible, developers must explicitly call X509::disableURLFetch() prior to parsing or validating untrusted certificates. This permanently deactivates dynamic fetching, preventing the execution of fetchURL() during signature validation.
For systems where dynamic AIA chasing is a business requirement, developers using the patched releases must invoke X509::setURLFetchCallback() to register a custom verification hook. This hook must validate that target hostnames do not resolve to local loopback ranges, private class subnets (RFC 1918), or link-local targets (RFC 3927) before allowing the socket connection to proceed.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
phpseclib phpseclib | >= 0.1.1, < 1.0.30 | 1.0.30 |
phpseclib phpseclib | >= 2.0.0, < 2.0.55 | 2.0.55 |
phpseclib phpseclib | >= 3.0.0, < 3.0.54 | 3.0.54 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-918 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 | 5.8 |
| Impact | Server-Side Request Forgery |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
The web server receives a URL or similar request from an upstream source and retrieves the value of this URL without validating the target destination.
A template injection vulnerability in @dynatrace-oss/dynatrace-mcp-server allows untrusted input to be interpolated directly into Dynatrace Workflows using Jinja2 syntax, leading to persistent data exposure and exfiltration.
An uncontrolled resource consumption vulnerability (CWE-400) in OliveTin allows unauthenticated remote attackers to exhaust server memory and trigger a denial of service (DoS). By repeatedly initiating the OAuth2 login flow without completing it, attackers can force the server to allocate state variables in an unbounded in-memory map. This heap-based resource exhaustion eventually causes the host operating system to terminate the OliveTin process via the Out-Of-Memory (OOM) killer.
An incorrect authorization vulnerability (CWE-863) exists in OliveTin prior to version 3000.17.0. The flaw allows authenticated users who are authorized to execute commands but restricted from viewing logs to bypass this restriction. By utilizing synchronous endpoints, attackers can directly access execution outputs containing sensitive system data, credentials, and environmental configurations.
An OS command injection vulnerability exists in OliveTin versions >= 3000.2.0 and < 3000.17.0. The flaw stems from a validation bypass in the shell safety engine, which fails to recognize custom regular expression arguments as unsafe for actions run in shell execution mode. Furthermore, because these custom regex checks evaluate partial string matches, attackers can append arbitrary shell metacharacters to valid inputs. This allows unauthenticated or low-privilege users who are authorized to run configured actions to inject shell commands and achieve arbitrary remote code execution on the host system.
A critical vulnerability (CVE-2026-63118) in the Model Context Protocol (MCP) Ruby SDK allows attackers to execute arbitrary JSON-RPC commands and exfiltrate sensitive local data from an MCP server bound to the local loopback interface. This is achieved through DNS-rebinding and cross-origin request execution due to missing validation of the HTTP Host and Origin headers in the StreamableHTTPTransport component.
CVE-2026-63119 is a high-impact denial-of-service vulnerability in the Model Context Protocol (MCP) Ruby SDK (distributed as the 'mcp' gem) before version 0.23.0. The vulnerability allows an attacker to cause resource exhaustion and process termination by streaming unbounded input to standard I/O streams.