Skip to main content
Menu
Advisories

PHP Object Injection to RCE in extension store via unverified HTTP response

GHSA-9XFW-VX6G-WPMMPublished Updated GitHub

Description

Impact

PHP Object Injection leading to Remote Code Execution (RCE).

The extension/store management handlers deserialize an HTTP response body with an unrestricted unserialize() (no allowed_classes restriction), while the bundled HTTP client disables TLS certificate verification by default. Because the certificate of the remote endpoint is not validated, a network / man-in-the-middle (MITM) attacker positioned on the path to the store endpoint (e.g. via DNS spoofing, a hostile/shared network, or a compromised resolver/upstream) can substitute the response body with an attacker-chosen PHP serialized payload.

On deserialization, the payload instantiates an in-tree POP gadget (GuzzleHttp\Cookie\FileCookieJar), whose destructor writes attacker-controlled content to an attacker-chosen path. This allows writing a .php file under the web root and achieving arbitrary code execution as the web-server user (full site and database compromise, persistence, lateral movement).

Who is impacted: NukeViet 4.x installations. Exploitation requires two preconditions: (1) an attacker able to intercept/alter the server's outbound traffic to the store endpoint, and (2) a privileged administrator (GODADMIN) performing a routine store action (opening the store list, install, update, or detail). The attacker does not need an account on the target.

Patches

Yes. The issue is fixed by two complementary hardening measures:

  • Safe deserialization: all unserialize() calls on internal/remote data now disallow object instantiation via ['allowed_classes' => false] (exposed as the NV_UNSERIALIZE_SAFE constant). The affected payloads are arrays/scalars only, so the change is behaviour-preserving.
  • TLS verification: certificate verification is enabled by default in the HTTP client, and the URL-check helper now verifies peer/host across its cURL, get_headers and stream_socket transports using the shipped CA bundle.

Users should upgrade to the patched release (NukeViet 4.6.xx or later — replace with the exact fixed version/tag).

Workarounds

Users who cannot upgrade immediately can reduce exposure by:

  • Enabling TLS certificate verification on the HTTP client (set sslverify => true for store/API requests and ensure a valid CA bundle is configured).
  • Avoiding extension store actions (list/install/update/detail) from administrator sessions while on untrusted or shared networks.
  • Restricting/monitoring outbound DNS and network paths from the server to prevent response substitution.

References

Affected versions

References

GitHub · nukeviet/nukeviet