Malicious Code Vulnerability in ts-imports Package

ts-imports Updated 02 Oct 2025

Summary

16/09/2025
CRITICAL
No i
Critical
Not published

MAL-2025-47355: Malicious code in ts-imports (npm). Affects ts-imports versions >= 1.0.1, <= 1.0.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The ts-imports package is an npm library designed to facilitate TypeScript imports in JavaScript projects. It aims to streamline the import process, making it easier for developers to manage dependencies. However, this package has been compromised, leading to the introduction of malicious code that poses significant security risks to users.

Vulnerability Detail

The vulnerability stems from the compromise of the ts-imports package, where malicious code was embedded within versions 1.0.1 and 1.0.2. This malicious payload is known to steal tokens and credentials, publishing them to GitHub and potentially propagating itself to other npm packages owned by the user. The implications of this vulnerability are severe, as any system running this package could be fully compromised, leading to unauthorized access to sensitive information.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall ts-imports

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary measure, you can avoid using the ts-imports package altogether until a secure version is confirmed. Additionally, ensure that all secrets and keys stored on affected systems are rotated immediately, as the compromise may have exposed them.

Conclusion

The ts-imports package has been compromised, leading to a significant security vulnerability that affects versions 1.0.1 and 1.0.2. Users are advised to uninstall these versions and update to a secure version immediately. Utilizing tools like Vulert can help in monitoring and preventing future vulnerabilities.

See every vulnerability recorded for ts-imports →

Share this vulnerability

FAQ

Versions 1.0.1 and 1.0.2 of the ts-imports package are affected by the malicious code vulnerability.

You should uninstall the affected versions of the ts-imports package and install a secure version immediately.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application by visiting the Vulert playground at Vulert Scanner without any signup.

The risks include unauthorized access to sensitive information, such as tokens and credentials, which can lead to further exploitation of your systems.

Regularly monitor your dependencies for vulnerabilities using tools like Vulert, and ensure to keep your packages updated to the latest secure versions.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall ts-imports

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback