GHSA-7vcx-v65q-9wpg — phpxmlrpc/phpxmlrpc
Fix: gggeek/phpxmlrpc@cf6e605GHSA-7vcx-v65q-9wpg is a security vulnerability in phpxmlrpc/phpxmlrpc. A fix is available for phpxmlrpc/phpxmlrpc — see the affected versions and patch details below.
XML-RPC for PHP's `Wrapper::buildClientWrapperCode` method allows code injection via malicious `$client` argument
Real-World Exposure
phpxmlrpc/phpxmlrpcReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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 asWrapper::wrapXmlrpcServer,Wrapper::wrapXmlrpcMethodorWrapper::buildWrapMethodSourcemust 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
$clientargument 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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | phpxmlrpc/phpxmlrpc | all versions | 4.9.0composer require phpxmlrpc/phpxmlrpc:^4.9.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpxmlrpc/phpxmlrpc, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update phpxmlrpc/phpxmlrpc to 4.9.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7vcx-v65q-9wpg is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-7vcx-v65q-9wpg can be triaged on real exposure rather than presence alone.
Tailored to GHSA-7vcx-v65q-9wpg. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-7vcx-v65q-9wpg in your dependencies?
O3 Security finds GHSA-7vcx-v65q-9wpg across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.