Malicious code in @onescience/onecode (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (713bf7fce40e177608dd5145e1662b4efd3da6c1597d9a1aeb15d7715b865205) The npm postinstall hook runs ensurePlatformBinary(), which downloads a.tgz archive from the hardcoded bare-IP URL https://218.90.133.98:4443/onecode_tgz/onecode-<ver>/onecode-linux-x64-<ver>.tgz, extracts it via `tar -xzf`, chmods the extracted file to 0o755, hardlinks it into bin/.onecode, and the shipped CLI launcher invokes it. The HTTPS request explicitly sets `rejectUnauthorized: false`, disabling TLS certificate verification, and no hash or signature check is performed on the downloaded artifact. The download destination is a bare IPv4 address on a non-standard port, not a publisher-owned domain or a recognized release host. The package name and launcher (@onescience/onecode) mirror the unrelated 'opencode' project — env-var fallbacks reference OPENCODE_BIN_PATH and bundled asset directories are named.opencode/session-seed and.opencode/oneskills — while the executable payload is retrieved from an unrelated hardcoded IP endpoint. Anyone controlling that host, or any on-path network attacker (TLS is disabled), can deliver arbitrary code that executes on every installer's machine.
AI Analysis
Technical Summary
The @onescience/onecode npm package's postinstall hook runs a function that downloads a tarball from a hardcoded bare IPv4 address over HTTPS with TLS verification disabled (rejectUnauthorized: false). The tarball is extracted and an executable is installed and invoked. No hash or signature verification is performed on the downloaded artifact. The download source is not a publisher-owned domain but a bare IP on a non-standard port, enabling arbitrary code execution if the remote host or network is compromised. The package name and launcher mimic an unrelated project 'opencode', using environment variables and asset directories referencing 'opencode' while retrieving payloads from an unrelated IP endpoint. This behavior constitutes a supply chain malicious package threat.
Potential Impact
Any user installing affected versions of @onescience/onecode will execute arbitrary code controlled by the attacker hosting the payload. This can lead to full compromise of the installer's environment. The lack of TLS certificate verification and absence of artifact integrity checks allow man-in-the-middle or remote host compromise to inject malicious payloads. The threat affects all users of the specified versions of the package.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing the affected versions of @onescience/onecode listed. Verify package authenticity before installation and consider using package integrity verification tools. Monitor for updates from the package publisher or npm advisories for official fixes. Since no patch information is available, patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Malicious code in @onescience/onecode (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (713bf7fce40e177608dd5145e1662b4efd3da6c1597d9a1aeb15d7715b865205) The npm postinstall hook runs ensurePlatformBinary(), which downloads a.tgz archive from the hardcoded bare-IP URL https://218.90.133.98:4443/onecode_tgz/onecode-<ver>/onecode-linux-x64-<ver>.tgz, extracts it via `tar -xzf`, chmods the extracted file to 0o755, hardlinks it into bin/.onecode, and the shipped CLI launcher invokes it. The HTTPS request explicitly sets `rejectUnauthorized: false`, disabling TLS certificate verification, and no hash or signature check is performed on the downloaded artifact. The download destination is a bare IPv4 address on a non-standard port, not a publisher-owned domain or a recognized release host. The package name and launcher (@onescience/onecode) mirror the unrelated 'opencode' project — env-var fallbacks reference OPENCODE_BIN_PATH and bundled asset directories are named.opencode/session-seed and.opencode/oneskills — while the executable payload is retrieved from an unrelated hardcoded IP endpoint. Anyone controlling that host, or any on-path network attacker (TLS is disabled), can deliver arbitrary code that executes on every installer's machine.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @onescience/onecode npm package's postinstall hook runs a function that downloads a tarball from a hardcoded bare IPv4 address over HTTPS with TLS verification disabled (rejectUnauthorized: false). The tarball is extracted and an executable is installed and invoked. No hash or signature verification is performed on the downloaded artifact. The download source is not a publisher-owned domain but a bare IP on a non-standard port, enabling arbitrary code execution if the remote host or network is compromised. The package name and launcher mimic an unrelated project 'opencode', using environment variables and asset directories referencing 'opencode' while retrieving payloads from an unrelated IP endpoint. This behavior constitutes a supply chain malicious package threat.
Potential Impact
Any user installing affected versions of @onescience/onecode will execute arbitrary code controlled by the attacker hosting the payload. This can lead to full compromise of the installer's environment. The lack of TLS certificate verification and absence of artifact integrity checks allow man-in-the-middle or remote host compromise to inject malicious payloads. The threat affects all users of the specified versions of the package.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing the affected versions of @onescience/onecode listed. Verify package authenticity before installation and consider using package integrity verification tools. Monitor for updates from the package publisher or npm advisories for official fixes. Since no patch information is available, patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10717
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a74cf8ebf8831d5391aea81
Added to database: 08/06/2026, 18:16:46 UTC
Last enriched: 08/06/2026, 18:41:27 UTC
Last updated: 09/21/2026, 09:59:38 UTC
Views: 36
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.