Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ MAL-2026-3774 — ts-build-optimize

⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Malicious code in ts-build-optimize (npm)

Source: amazon-inspector

The package masquerades as a TypeScript helper library (README is lifted from Microsoft's tslib and references --importHelpers, __extends, __assign, and a fake github.com/microsoft/ts-build-optimize/releases URL). The shipped index.js has nothing to do with TypeScript helpers: it exports a function buildoptimize whose default arguments are hardcoded to fetch https://verceljs-kappa.vercel.app/icons/23 and pass the response body directly to eval() (index.js:61-63 sets uuri = "https://verceljs-kappa.vercel.app/icons/"; index.js:79 executes eval(JSON.parse(b)); the function is exported at index.js:95). Any consumer who imports this package and calls buildoptimize() — which the name and README imply is a build-time optimizer — will execute arbitrary attacker-controlled JavaScript on the installer/build machine. The Vercel destination is mutable (the author can swap the payload at any time), no hash or signature is verified, and the hosting domain is unrelated to Microsoft or any legitimate tslib publisher. The C2 endpoint serves a benign 6,758-byte PNG decoy when requested without the package's hardcoded bearrtoken: logo HTTP header (so casual scanners and curl see only an image), but returns 53,347 bytes of JSON-wrapped, heavily-obfuscated JavaScript when the header is present. Static analysis of the fetched second stage (sha256 of the raw response body fd082d2406d65aa78d5f1028e11dc23e85d63f07c459fb048d08236a65590b99; sha256 of the JSON-decoded JavaScript source 47d235dad37c7fb86e231822a4c231344cbd006e58b8cb9a013b064c1a521eb8 — captured 2026-05-15, payload is mutable) shows wallet-theft and persistence functionality: references to the Exodus cryptocurrency wallet on macOS (/Library/Application Support/exodus.wallet) and Windows (/AppData/Roaming/Exodus/exodus.wallet); functions named installWindows, uninstallWindows, installMac, uninstallMac, isInstalledWindows, and a macPlistPath constant indicating per-OS persistence install/uninstall machinery; heavy use of child_process.execSync/exec to invoke shell commands; and a top-level setInterval(main, 30000) re-execution loop. The combination of name-squat on a widely-used Microsoft package, README impersonation, header-gated decoy, and a remote-eval primitive that delivers wallet-theft + persistence makes this an unambiguous supply-chain attack.

Source: ghsa-malware

Any 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.

Affected software

MAL-2026-3774 is recorded against 1 package.

  • ts-build-optimize

Timeline and source

Published on 14 May 2026 and last revised on 6 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)
www.npmjs.com (Package)
github.com (Advisory)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2026-05-14
Updated 2026-08-20
Modified 2026-07-06
Fix URL N/A

Affected Packages

Software From version Fixed in
ts-build-optimize

Free Vulnerability Check

Is your site affected by MAL-2026-3774?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against MAL-2026-3774 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesMalicious packagesMalicious packages 2026