GitHub Advisoryadvisory · npm

GHSA-pgcr-7wm4-mcv6 Sensitive Data Exposure in pem

CRITICAL Published 2019-06-04 Modified 2021-08-04 Official page ↗
Ecosystem
npm
Packages
pem
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-200
Reviewed
2019-06-04

Affected packages

• npm pem: < 1.13.2 → fixed in 1.13.2

Description

Versions of `pem` before 1.13.2 expose 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. Recommendation Update to version 1.13.2 or later.

Related

Weakness · CWE (1)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness

References