Skip to main content

Malicious code in ts-bn-lint-helper (npm)

0
Critical
Published: 06/23/2026 (06/23/2026, 16:11:21 UTC)
Source: GCVE Database
Product: ts-bn-lint-helper

Description

The npm package ts-bn-lint-helper masquerades as a TypeScript lint helper but contains malicious code that harvests sensitive files and shell history from the user's environment. It recursively searches the current working directory for configuration and credential files and exfiltrates them, along with shell history files, to an attacker-controlled server. The package uses base64 encoding to hide the exfiltration URL and target file patterns. Execution of the from_str() function or running npm test triggers the data theft. The package metadata is minimal and deceptive, mimicking legitimate tooling to avoid detection.

Affected software

npmghsa
ts-bn-lint-helper
Affected versions
=3.1.19

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

AILast updated: 09/08/2026, 14:37:57 UTC

Technical Analysis

The ts-bn-lint-helper npm package version 3.1.19 contains embedded malicious code in its index.js file that, when invoked, recursively scans the current working directory for files named id.json, config.toml, Config.toml, config.json, env, and .env, and uploads them to a remote server via an axios POST request. It also harvests shell history from common shell history files such as ~/.bash_history, ~/.zsh_history, fish history, ~/.sh_history, and PowerShell's PSReadLine ConsoleHost_history.txt, using fallback shell commands executed via execSync if necessary. The exfiltration URL and file patterns are base64-encoded to evade simple detection. The malicious function from_str() is automatically called during npm test execution. The package metadata is sparse and designed to appear legitimate, increasing the risk of unsuspecting developers installing and running it.

Potential Impact

Any user or system that installs ts-bn-lint-helper version 3.1.19 and executes the from_str() function or runs npm test will have sensitive files and shell history from their working directory and home directory exfiltrated to an attacker-controlled server. This leads to credential leakage and exposure of potentially sensitive environment configuration and command history, which can be leveraged for further attacks or unauthorized access.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately remove ts-bn-lint-helper version 3.1.19 from their projects and avoid executing npm test or calling from_str() from this package. Audit dependencies for this package and replace it with trusted alternatives. Monitor for any suspicious network activity related to data exfiltration. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-6318
Osv Schema Version
1.7.4
Aliases
["GHSA-27pp-cq88-wg87"]
Ecosystems
["npm"]

Threat ID: 6a96f316acd9273b49e49398

Added to database: 09/01/2026, 15:45:26 UTC

Last enriched: 09/08/2026, 14:37:57 UTC

Last updated: 10/03/2026, 18:25:31 UTC

Views: 27

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses