The automatic binary fallback handles npm credentials using a weak substring hostname check and reuses that behavior for redirects, creating a concrete risk of leaking NPM_TOKEN to an untrusted destination. This is a credential-handling vulnerability; the source does not establish that the package intentionally selects a malicious host.
Static reason
One or more suspicious static signals were detected.
Trigger
Postinstall runs when the package is installed; the vulnerable request path is used when the platform binary is missing and NPM_TOKEN is set.
Impact
An exposed NPM_TOKEN could be used to access or publish to npm according to the token’s permissions.
Mechanism
install.js checks whether the hostname contains “npmjs.org” and follows redirects by calling makeRequest again, allowing a destination such as an attacker-controlled hostname containing that substring to receive the Authorization header.
Evidence
package.jsoninstall.jsbin/droid
Network endpoints2
registry.npmjs.orgHosts whose names contain npmjs.org, including redirect destinations