Vulnerabilities in pkg:npm/faker
PACKAGEGHSA-5w9c-rv96-fr7g is a HIGH removal of functional code vulnerability (General Security Weakness) affecting Faker libraries in the npm ecosystem. The issue involves removal of functional code in faker.js. Remediation is available in the latest vendor maintenance releases.
pkg:npm/faker
Vulnerability advisories affecting package pkg:npm/faker. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-5w9c-rv96-fr7g | - | HIGH | Removal of functional code in faker.js |
GHSA-5w9c-rv96-fr7g at a Glance
How to Fix GHSA-5w9c-rv96-fr7g
To remediate this vulnerability, upgrade all affected Faker 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 faker@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls faker
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-5w9c-rv96-fr7g, inspect your project dependencies using npm:
npm ls faker
Analyze the terminal output to locate any version of Faker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls faker 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 General Security Weakness. In Faker, 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-5w9c-rv96-fr7g Affected Faker Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
faker
|
npm |
6.6.6
All 1 versions
6.6.6
|
None specified
|
References
Frequently Asked Questions
What is GHSA-5w9c-rv96-fr7g?
Which Faker versions are affected?
What version fixes GHSA-5w9c-rv96-fr7g?
Is faker affected?
What CWE is associated with GHSA-5w9c-rv96-fr7g?
How can I check npm dependencies for GHSA-5w9c-rv96-fr7g?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5w9c-rv96-fr7g",
"modified" : "2022-03-22T20:33:40Z",
"published" : "2022-03-22T19:28:24Z",
"aliases" : [ ],
"summary" : "Removal of functional code in faker.js",
"details" : "Faker.js helps users create large amounts of data for testing and development. The maintainer deliberately removed the functional code from this package. This appears to be a purposeful and successful attempt to make the package unusable. This is related to the colors.js [CVE-2021-23567](https://github.com/advisories/GHSA-gh88-3pxp-6fm8). \n\nThe functional code for this package was forked and can be found [here](https://github.com/faker-js/faker). ",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "faker"
},
"versions" : [ "6.6.6" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23567"
}, {
"type" : "WEB",
"url" : "https://github.com/Marak/colors.js/issues/285"
}, {
"type" : "WEB",
"url" : "https://github.com/Marak/colors.js/issues/285%23issuecomment-1008212640"
}, {
"type" : "WEB",
"url" : "https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d13d28632bd8a049ff136fb6#diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1R18"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Marak/Faker.js"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-gh88-3pxp-6fm8"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-COLORS-2331906"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/@faker-js/faker"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/faker"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-22T19:28:24Z",
"nvd_published_at" : null
}
}