CVE-2026-73231: Faker Helpers.fake Exploitable Into Arbritary Code Vulnerability
HIGHCVE-2026-73231 is a HIGH (CVSS 7.8) helpers.fake exploitable into arbritary code vulnerability (CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')) affecting Faker libraries in the npm ecosystem. The issue involves helpers.fake exploitable into arbritary code execution. Remediation is available by upgrading affected packages to version 10.5.0.
CVE-2026-73231 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-73231
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-js/faker@10.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @faker-js/faker
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-73231, inspect your project dependencies using npm:
npm ls @faker-js/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 10.5.0), your application is affected.
Note: The npm ls @faker-js/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 CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval"). 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
CVE-2026-73231 Affected Faker Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@faker-js/faker
|
npm |
< 10.5.0
|
10.5.0
|
References
Frequently Asked Questions
What is CVE-2026-73231?
Which Faker versions are affected?
What version fixes CVE-2026-73231?
Is @faker-js/faker affected?
What is the CVSS score of CVE-2026-73231?
What CWE is associated with CVE-2026-73231?
How can I check npm dependencies for CVE-2026-73231?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qxc2-j82w-r537",
"modified" : "2026-09-02T14:20:14Z",
"published" : "2026-09-02T14:20:14Z",
"aliases" : [ "CVE-2026-73231" ],
"summary" : "Faker: helpers.fake exploitable into arbritary code execution",
"details" : "### Summary\n\n`faker.helpers.fake` can be tricked into arbritary code execution.\n\n### Details\n\nfakeEval.resolveProperty resolves properties on functions itself instead of resolving the nested function first.\nThis can be addressed by recursively calling resolveProperty instead of accessing the property after one iteration.\n\n### PoC\n\nGo to https://fakerjs.dev/\nOpen Browser console and run\n\n````ts\nawait enableFaker(); // or import faker\nfaker.rawDefinitions.test = (() => () => {}); // Any function that returns a function\nfaker.helpers.fake(`{{test.constructor(alert('PowerLevel: Eval'))}}`);\n````\n\n### Impact\n\nThe Fake method claims:\n\n> It is also NOT possible to use any non-faker methods or plain javascript in such patterns.\n\nWhich is objectively false, since any global gets fully accessible in the fake string.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@faker-js/faker"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.5.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 10.4.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/faker-js/faker/security/advisories/GHSA-qxc2-j82w-r537"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-73231"
}, {
"type" : "WEB",
"url" : "https://github.com/faker-js/faker/pull/3852"
}, {
"type" : "WEB",
"url" : "https://github.com/faker-js/faker/commit/54586208f904012f57c50b46cc1ad32bcbe4bfb7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/faker-js/faker"
}, {
"type" : "WEB",
"url" : "https://github.com/faker-js/faker/releases/tag/v10.5.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-95" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-02T14:20:14Z",
"nvd_published_at" : "2026-08-11T20:18:48Z"
}
}