GHSA-pgcr-7wm4-mcv6: Pem Sensitive Data Exposure Vulnerability
CRITICALGHSA-pgcr-7wm4-mcv6 is a CRITICAL (CVSS 7.5) sensitive data exposure vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Pem libraries in the npm ecosystem. The issue involves sensitive data exposure in pem. Remediation is available by upgrading affected packages to version 1.13.2.
GHSA-pgcr-7wm4-mcv6 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-pgcr-7wm4-mcv6
To remediate this vulnerability, upgrade all affected Pem dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install pem@1.13.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls pem
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-pgcr-7wm4-mcv6, inspect your project dependencies using npm:
npm ls pem
Analyze the terminal output to locate any version of Pem in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.13.2), your application is affected.
Note: The npm ls pem command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Pem, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-pgcr-7wm4-mcv6 Affected Pem Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pem
|
npm |
< 1.13.2
|
1.13.2
|
References
Frequently Asked Questions
What is GHSA-pgcr-7wm4-mcv6?
Which Pem versions are affected?
What version fixes GHSA-pgcr-7wm4-mcv6?
Is pem affected?
What is the CVSS score of GHSA-pgcr-7wm4-mcv6?
What CWE is associated with GHSA-pgcr-7wm4-mcv6?
How can I check npm dependencies for GHSA-pgcr-7wm4-mcv6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}