Information Exposure Affecting pem package, versions <1.13.2


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-PEM-173687
  • published13 Feb 2019
  • disclosed6 Nov 2018
  • creditThe UK's National Cyber Security Centre (NCSC)

Introduced: 6 Nov 2018

CVE NOT AVAILABLE CWE-200  (opens in a new tab)

How to fix?

Upgrade pem to version 1.13.2 or higher.

Overview

pem is a package to create private keys and certificates with node.js.

Affected versions of this package are vulnerable to Information Exposure. The package exposes sensitive data when the readPkcs12 is used.

The readPkcs12 function reads the certificate and key data from a pkcs12 file using the encryption password. As part of this process it creates a globally readable file with a filename of 20 random 0-f characters in the temporary directory containing the password which is then read by OpenSSL. The file containing the password is never cleaned up after it is used giving access to the pkcs12 password to any other users with access to read files from the system.

CVSS Scores

version 3.1