Critical Malicious Code Vulnerability in use-unsaved-changes Package

use-unsaved-changes Updated 24 Nov 2025

Summary

24/11/2025
CRITICAL
No i
Critical
Not published

MAL-2025-190941: Malicious code in use-unsaved-changes (npm). Affects use-unsaved-changes versions 1.0.9. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The 'use-unsaved-changes' package is a utility designed for managing unsaved changes in web applications, particularly within the npm ecosystem. It allows developers to prompt users about unsaved changes before navigating away from a page. However, this package has been compromised, leading to significant security concerns due to embedded malicious code.

Vulnerability Detail

The vulnerability originates from a malicious version of the 'use-unsaved-changes' package, specifically version 1.0.9. This version contains embedded malicious code that can compromise any computer running it. The ramifications include unauthorized access to sensitive data, such as secrets and keys stored on the affected machine. Users are advised to treat any system with this package installed as fully compromised, as the removal of the package may not eliminate all traces of the malicious software.

How To Fix

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

npm uninstall use-unsaved-changes

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

Currently, there are no effective workarounds to mitigate the risks associated with this vulnerability other than removing the package entirely.

Conclusion

The 'use-unsaved-changes' package has been compromised with malicious code, posing serious security risks. It is essential to uninstall the affected version and monitor your systems for any unauthorized access. Utilizing tools like Vulert can help in identifying and managing such vulnerabilities effectively.

See every vulnerability recorded for use-unsaved-changes →

Share this vulnerability

FAQ

Immediately uninstall the package using 'npm uninstall use-unsaved-changes' and rotate any secrets or keys stored on the affected machine.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

Failing to address this vulnerability can lead to unauthorized access to sensitive data and potential full control of your system by malicious actors.

Regularly audit your dependencies and use tools like Vulert to monitor for vulnerabilities in real-time.

If immediate removal is not possible, ensure that sensitive data is secured and consider isolating the affected system from the network until the package can be removed.

How To Fix

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

npm uninstall use-unsaved-changes

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