Malicious code in loadyaml package

loadyaml Updated 02 Oct 2025

Summary

01/10/2020
CRITICAL
No i
Critical
Not published

GHSA-mfc2-93pr-jf92: Malicious code in loadyaml. Affects loadyaml versions < 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 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 loadyaml package is an npm package that allows users to load YAML files in their Node.js applications. It provides a simple and convenient way to parse and access data from YAML files. However, a recent vulnerability has been discovered in the loadyaml package, which allows malicious code execution upon installation.

Vulnerability Detail

The loadyaml package was found to contain malicious code that runs a preinstall script upon installation. This script writes a public comment on GitHub, leaking sensitive information such as IP and IP-based geolocation, home directory name, and local username. The malicious packages, loadyaml and electorn, have been removed from the npm registry, and the leaked content has been removed from GitHub. This vulnerability poses a significant risk to users' privacy and security.

How To Fix

No fixed version is published for this vulnerability.

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

Workaround

There is no specific workaround provided for this vulnerability. The best course of action is to follow the steps mentioned in the 'how_to_fix' section and avoid using the loadyaml package.

Conclusion

The loadyaml package has been found to contain malicious code that leaks sensitive information upon installation. It is crucial to avoid using this package and any versions prior to 1.0.2. Instead, opt for alternative packages and regularly update your dependencies to ensure you are using the latest secure versions. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for loadyaml →

Share this vulnerability

FAQ

The loadyaml package is an npm package that allows users to load YAML files in their Node.js applications. It provides a convenient way to parse and access data from YAML files.

This vulnerability allows malicious code execution upon installation of the loadyaml package. It leaks sensitive information such as IP and IP-based geolocation, home directory name, and local username.

Yes, the malicious packages, loadyaml and electorn, have been removed from the npm registry. The leaked content from the preinstall script has also been removed from GitHub.

To fix this vulnerability, it is recommended to avoid using the loadyaml package and any versions prior to 1.0.2. Instead, consider using alternative packages that provide similar functionality and have not been affected by this vulnerability. Regularly updating your packages is also important.

There is no specific workaround provided for this vulnerability. The best course of action is to follow the steps mentioned in the 'how_to_fix' section and avoid using the loadyaml package.

Related vulnerabilities

Recent vulnerabilities recorded for loadyaml.

How To Fix

No fixed version is published for this vulnerability.

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