GHSA-7VCX-V65Q-9WPG

Vulnerability from github – Published: 2023-01-11 23:53 – Updated: 2023-01-11 23:53
VLAI
Summary
XML-RPC for PHP's `Wrapper::buildClientWrapperCode` method allows code injection via malicious `$client` argument
Details

In order for this weakness to be exploited, the following conditions have to apply, at the same time:

  • method Wrapper::buildClientWrapperCode, or any methods which depend on it, such as Wrapper::wrapXmlrpcServer, Wrapper::wrapXmlrpcMethod or Wrapper::buildWrapMethodSource must be in use. Note that they are not used by default in either the Client or Server classes provided by the library; the developer has to specifically make use of them in his/her own code
  • the $client argument to either of those methods should have been built with malicious data, ie. data controlled by a 3rd party, passed to its constructor call

This is most likely an uncommon usage scenario, and as such the chances of exploitation may be low.

NB the graphical debugger which is shipped as part of the library is vulnerable to this, when used with the option "Generate stub for method call" selected. In that case, the debugger will display but not execute the malicious code, which would have to be provided via carefully crafted values for the "Address" and "Path" inputs.

The attack scenario in this case is that a developer copies into his/her own source code the php snippet generated by the debugger, in a situation where the debugger is used with "Address"/"Path" input values supplied by a 3rd party. The malicious payload in the "Address"/"Path" input values should be easily recognized as suspicious by any barely proficient developer, as it resembles a bog-standard injection attack. It goes without saying that a responsible developer should not blindly copy and paste into his/her own code anything generated by a 3rd party tool, such as the phpxmlrpc debugger, without giving it at least a cursory scan.

Originally reported as issue #80

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "phpxmlrpc/phpxmlrpc"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.9.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-01-11T23:53:34Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "In order for this weakness to be exploited, the following conditions have to apply, at the same time:\n\n- method `Wrapper::buildClientWrapperCode`, or any methods which depend on it, such as `Wrapper::wrapXmlrpcServer`, `Wrapper::wrapXmlrpcMethod` or `Wrapper::buildWrapMethodSource` must be in use. Note that they are _not_ used by default in either the Client or Server classes provided by the library; the developer has to specifically make use of them in his/her own code\n- the `$client` argument to either of those methods should have been built with malicious data, ie. data controlled by a 3rd party, passed to its constructor call\n\nThis is most likely an uncommon usage scenario, and as such the chances of exploitation may be low.\n\n*NB* the graphical debugger which is shipped as part of the library is vulnerable to this, when used with the option \"Generate stub for method call\" selected. In that case, the debugger will _display_ but not _execute_ the malicious code, which would have to be provided via carefully crafted values for the \"Address\" and \"Path\" inputs.\n\nThe attack scenario in this case is that a developer copies into his/her own source code the php snippet generated by the debugger, in a situation where the debugger is used with \"Address\"/\"Path\" input values supplied by a 3rd party.\nThe malicious payload in the \"Address\"/\"Path\" input values should be easily recognized as suspicious by any barely proficient developer, as it resembles a bog-standard injection attack.\nIt goes without saying that a responsible developer should not blindly copy and paste into his/her own code anything generated by a 3rd party tool, such as the phpxmlrpc debugger, without giving it at least a cursory scan.\n\nOriginally reported as issue #80",
  "id": "GHSA-7vcx-v65q-9wpg",
  "modified": "2023-01-11T23:53:34Z",
  "published": "2023-01-11T23:53:34Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/gggeek/phpxmlrpc/security/advisories/GHSA-7vcx-v65q-9wpg"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gggeek/phpxmlrpc/issues/80"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gggeek/phpxmlrpc/commit/cf6e605e09d001ce520bfa8e7b168cfa514e663b"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/gggeek/phpxmlrpc"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "XML-RPC for PHP\u0027s `Wrapper::buildClientWrapperCode` method allows code injection via malicious `$client` argument"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…