{
  "schema_version": "1.4.0",
  "id": "GHSA-pgcr-7wm4-mcv6",
  "modified": "2021-08-04T21:28:00Z",
  "published": "2019-06-04T15:42:45Z",
  "aliases": [],
  "summary": "Sensitive Data Exposure in pem",
  "details": "Versions of `pem` before 1.13.2 expose sensitive data when the `readPkcs12` is used. \n\nThe `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.\n\n\n\n## Recommendation\n\nUpdate to version 1.13.2 or later.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "pem"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.13.2"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Dexus/pem/pull/217"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Dexus/pem/commit/bed1190e4a08692ac903ae6043489f1f76bc67eb"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-PEM-173687"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/723"
    }
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2019-06-04T15:41:30Z",
    "nvd_published_at": null
  }
}