Severity: critical

    Sensitive Data Exposure

    pem

    Overview

    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.

    Remediation

    Update to version 1.13.2 or later.

    Have content suggestions? Visit npmjs.com/support.

    Advisory timeline

    1. Created

      2018-11-06T17:50:40.75
    2. Updated

      2019-09-26T20:26:51.982