GHSA-m95x-m25c-w9mp: Phpxmlrpc/phpxmlrpc :send Method Vulnerability

MODERATE
Published
Advisory Summary

GHSA-m95x-m25c-w9mp is a MODERATE :send method vulnerability (General Security Weakness) affecting Phpxmlrpc/phpxmlrpc libraries in the Packagist ecosystem. The issue involves :send method. Remediation is available by upgrading affected packages to version 4.9.0.

GHSA-m95x-m25c-w9mp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-m95x-m25c-w9mp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Phpxmlrpc/phpxmlrpc
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-m95x-m25c-w9mp

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

phpxmlrpc/phpxmlrpc fixed: 4.9.0
Upgrade phpxmlrpc/phpxmlrpc to 4.9.0
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 phpxmlrpc/phpxmlrpc

How to Check if You Are Affected

To determine whether your application is affected by GHSA-m95x-m25c-w9mp, inspect your project dependencies for Phpxmlrpc/phpxmlrpc:

inspect dependencies for phpxmlrpc/phpxmlrpc

Analyze the terminal output to locate any version of Phpxmlrpc/phpxmlrpc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.0), 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 General Security Weakness. In Phpxmlrpc/phpxmlrpc, 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

Abusing the `$method` argument of Client::send, it was possible to force the client to _access local files_ or _connect to undesired urls_ instead of the intended target server's url (the one used in the Client constructor). This weakness only affects installations where all the following conditions apply, at the same time: - the xmlrpc Client is used, ie. not xmlrpc servers - untrusted data (eg. data from remote users) is used as value for the `$method` argument of method `Client::send()`, in conjunction with conditions which trigger usage of curl as http transport (ie. either using the https, http11 or http2 protocols, or calling `Client::setUseCurl()` beforehand) - either have set the Clients `return_type` property to 'xml', or make the resulting Response's object `httpResponse` member, which is intended to be used for debugging purposes only, available to 3rd parties, eg. by displaying it to the end user or serializing it in some storage (note that the same data can also be accessed via magic property `Response::raw_data`, and in the Request's `httpResponse` member) This is most likely a very uncommon usage scenario, and as such the chances of exploitation of this issue may be low. If it is not possible to upgrade to this release of the library at this time, a proactive security measure, to avoid the Client accessing any local file on the server which hosts it, is to add the following call to your code: $client->setCurlOptions([CURLOPT_PROTOCOLS, CURLPROTO_HTTPS|CURLPROTO_HTTP]); Originally reported as issue #81

GHSA-m95x-m25c-w9mp Affected Phpxmlrpc/phpxmlrpc Versions

1 component(s)
Fixed Versions:
4.9.0
Product / Package Ecosystem Affected Versions Fixed Version
phpxmlrpc/phpxmlrpc
Packagist
< 4.9.0
4.9.0

References

Frequently Asked Questions

What is GHSA-m95x-m25c-w9mp?
GHSA-m95x-m25c-w9mp is a security vulnerability in Phpxmlrpc/phpxmlrpc involving :send method under General Security Weakness.
Which Phpxmlrpc/phpxmlrpc versions are affected?
Affected versions include releases prior to 4.9.0 across affected packages: phpxmlrpc/phpxmlrpc.
What version fixes GHSA-m95x-m25c-w9mp?
Upgrading to 4.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpxmlrpc/phpxmlrpc affected?
Yes, phpxmlrpc/phpxmlrpc is affected in releases prior to 4.9.0. Upgrade your dependency to 4.9.0 or later.
What CWE is associated with GHSA-m95x-m25c-w9mp?
GHSA-m95x-m25c-w9mp is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-m95x-m25c-w9mp?
Run the dependency tree command: 'inspect dependencies for phpxmlrpc/phpxmlrpc'. 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-m95x-m25c-w9mp",
  "modified" : "2023-01-11T23:54:47Z",
  "published" : "2023-01-11T23:54:47Z",
  "aliases" : [ ],
  "summary" : "XML-RPC for PHP allows access to local files via malicious argument to the Client::send method",
  "details" : "Abusing the `$method` argument of Client::send, it was possible to force the client to _access local files_ or _connect to undesired urls_ instead of the intended target server's url (the one used in the Client constructor).\n\nThis weakness only affects installations where all the following conditions apply, at the same time:\n\n- the xmlrpc Client is used, ie. not xmlrpc servers\n- untrusted data (eg. data from remote users) is used as value for the `$method` argument of method `Client::send()`, in conjunction with conditions which trigger usage of curl as http transport (ie. either using the https, http11 or http2 protocols, or calling `Client::setUseCurl()` beforehand)\n- either have set the Clients `return_type` property to 'xml', or make the resulting Response's object `httpResponse` member, which is intended to be used for debugging purposes only, available to 3rd parties, eg. by displaying it to the end user or serializing it in some storage (note that the same data can also be accessed via magic property `Response::raw_data`, and in the Request's `httpResponse` member)\n\nThis is most likely a very uncommon usage scenario, and as such the chances of exploitation of this issue may be low.\n\nIf it is not possible to upgrade to this release of the library at this time, a proactive security measure, to avoid the Client accessing any local file on the server which hosts it, is to add the following call to your code:\n\n      $client->setCurlOptions([CURLOPT_PROTOCOLS, CURLPROTO_HTTPS|CURLPROTO_HTTP]);\n\nOriginally reported as issue #81",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpxmlrpc/phpxmlrpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gggeek/phpxmlrpc/security/advisories/GHSA-m95x-m25c-w9mp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gggeek/phpxmlrpc/issues/81"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gggeek/phpxmlrpc/commit/cf6e605e09d001ce520bfa8e7b168cfa514e663b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gggeek/phpxmlrpc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-11T23:54:47Z",
    "nvd_published_at" : null
  }
}