CVE-2022-5520: Malicious code in puppetlabs-stdlib (npm)

puppetlabs-stdlib Updated 02 Oct 2025

Summary

20/06/2022
CRITICAL
No i
Critical
Not published

MAL-2022-5520: Malicious code in puppetlabs-stdlib (npm). Affected versions are not published. 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 puppetlabs-stdlib package is an npm package that provides a standard library of Puppet functions and types. It is widely used in Puppet deployments to simplify and streamline the management of infrastructure. However, the package has been found to contain malicious code, compromising the security of any computer that has it installed or running.

Vulnerability Detail

The malicious code in puppetlabs-stdlib (npm) has been identified as a serious security threat. Any computer with this package installed or running should be considered fully compromised. The code gives control of the computer to an outside entity, potentially leading to unauthorized access and data breaches. It is crucial to rotate all secrets and keys stored on the affected computer immediately from a different computer. Although removing the package is recommended, there is no guarantee that it will remove all the malicious software resulting from its installation.

How To Fix

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

npm uninstall puppetlabs-stdlib

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

There is no specific workaround mentioned for this vulnerability. It is crucial to follow the steps mentioned in the 'how_to_fix' section to mitigate the risk.

Conclusion

The presence of malicious code in the puppetlabs-stdlib package poses a significant security risk. It is crucial to take immediate action by rotating secrets and keys, removing the package, and conducting a thorough security audit. Implementing additional security measures will help prevent future compromises. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for puppetlabs-stdlib →

Share this vulnerability

FAQ

Puppetlabs-stdlib is an npm package that provides a standard library of Puppet functions and types. It is used in Puppet deployments to simplify infrastructure management.

The malicious code in puppetlabs-stdlib gives control of the computer to an outside entity, potentially leading to unauthorized access and data breaches.

If you have puppetlabs-stdlib installed, it is crucial to rotate all secrets and keys stored on the affected computer immediately from a different computer. Remove the package and perform a thorough security audit.

There is no guarantee that removing the puppetlabs-stdlib package will remove all the malicious software resulting from its installation. A thorough security audit is recommended.

To prevent future compromises, implement additional security measures such as regular security audits, strong access controls, and monitoring for suspicious activities.

How To Fix

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

npm uninstall puppetlabs-stdlib

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