CVE-2026-73231
Faker: helpers.fake exploitable into arbritary code execution
Faker generates massive amounts of fake data in the browser and Node.js. Prior to 10.5.0, the faker.helpers.fake method in src/modules/helpers/eval.ts allows attacker-controlled fake templates to access the Function constructor through fakeEval.resolveProperty when a function returns another function, enabling arbitrary JavaScript code execution. This issue is fixed in version 10.5.0.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.8
Faker: helpers.fake exploitable into arbritary code execution
Faker generates massive amounts of fake data in the browser and Node.js. Prior to 10.5.0, the faker.helpers.fake method in src/modules/helpers/eval.ts allows attacker-controlled fake templates to access the Function constructor through fakeEval.resolveProperty when a function returns another function, enabling arbitrary JavaScript code execution. This issue is fixed in version 10.5.0.
- Record
CVE-2026-73231- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-95
- Updated
- 2026-11-02
EUVDEUVD-2026-56923
7.8
Faker generates massive amounts of fake data in the browser and Node.js. Prior to 10.5.0, the faker.helpers.fake method in src/modules/helpers/eval.ts allows attacker-controlled fake templates to access the Function constructor through fakeEval.resolveProperty when a function returns another function, enabling arbitrary JavaScript code execution. This issue is fixed in version 10.5.0.
- Record
EUVD-2026-56923- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-qxc2-j82w-r537
7.8
Faker: helpers.fake exploitable into arbritary code execution
Summary
faker.helpers.fake can be tricked into arbritary code execution.
Details
fakeEval.resolveProperty resolves properties on functions itself instead of resolving the nested function first. This can be addressed by recursively calling resolveProperty instead of accessing the property after one iteration.
PoC
Go to https://fakerjs.dev/ Open Browser console and run
await enableFaker(); // or import faker
faker.rawDefinitions.test = (() => () => {}); // Any function that returns a function
faker.helpers.fake(`{{test.constructor(alert('PowerLevel: Eval'))}}`);
Impact
The Fake method claims:
It is also NOT possible to use any non-faker methods or plain javascript in such patterns.
Which is objectively false, since any global gets fully accessible in the fake string.
- Record
GHSA-qxc2-j82w-r537- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-95
- Updated
- 2026-11-02
NVD
7.8
Faker generates massive amounts of fake data in the browser and Node.js. Prior to 10.5.0, the faker.helpers.fake method in src/modules/helpers/eval.ts allows attacker-controlled fake templates to access the Function constructor through fakeEval.resolveProperty when a function returns another function, enabling arbitrary JavaScript code execution. This issue is fixed in version 10.5.0.
- Record
CVE-2026-73231- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-95
- Updated
- 2026-11-02
OSV
7.8
Faker: helpers.fake exploitable into arbritary code execution
Faker generates massive amounts of fake data in the browser and Node.js. Prior to 10.5.0, the faker.helpers.fake method in src/modules/helpers/eval.ts allows attacker-controlled fake templates to access the Function constructor through fakeEval.resolveProperty when a function returns another function, enabling arbitrary JavaScript code execution. This issue is fixed in version 10.5.0.
- Record
CVE-2026-73231- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-95
- Updated
- 2026-11-02
OSVGHSA-qxc2-j82w-r537
7.8
Faker: helpers.fake exploitable into arbritary code execution
Summary
faker.helpers.fake can be tricked into arbritary code execution.
Details
fakeEval.resolveProperty resolves properties on functions itself instead of resolving the nested function first. This can be addressed by recursively calling resolveProperty instead of accessing the property after one iteration.
PoC
Go to https://fakerjs.dev/ Open Browser console and run
await enableFaker(); // or import faker
faker.rawDefinitions.test = (() => () => {}); // Any function that returns a function
faker.helpers.fake(`{{test.constructor(alert('PowerLevel: Eval'))}}`);
Impact
The Fake method claims:
It is also NOT possible to use any non-faker methods or plain javascript in such patterns.
Which is objectively false, since any global gets fully accessible in the fake string.
- Record
GHSA-qxc2-j82w-r537- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-95
- Updated
- 2026-11-02
Show 4 moreShow less
OSVCLSA-2026-1793299902 No score
TuxCare security update for faker (1 CVE)
TuxCare rebuilt faker to address 1 CVE. Fixed in 5.5.3-tuxcare.1.
- Record
CLSA-2026-1793299902- Updated
- 2026-11-02
OSVCLSA-2026-1793301523 No score
TuxCare security update for @faker-js/faker (1 CVE)
TuxCare rebuilt @faker-js/faker to address 1 CVE. Fixed in 5.5.3-tuxcare.2.
- Record
CLSA-2026-1793301523- Updated
- 2026-11-02
OSVCLSA-2026-1793989312 No score
TuxCare security update for @faker-js/faker (1 CVE)
TuxCare rebuilt @faker-js/faker to address 1 CVE. Fixed in 10.4.0-tuxcare.1.
- Record
CLSA-2026-1793989312- Updated
- 2026-11-07
OSVROOT-APP-NPM-CVE-2026-73231 No score
CVE-2026-73231 in @faker-js/faker - Patched by Root
Root has patched CVE-2026-73231 in the @faker-js/faker package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-73231- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@faker-js/fakernpm |
through 10.4.0 | 10.5.0 |
fakerTuxCare:npm |
5.5.3-tuxcare.0 up to 5.5.3-tuxcare.1, plus listed versions 5.5.3 |
5.5.3-tuxcare.1 |
@faker-js/fakerTuxCare:npm |
5.5.3-tuxcare.0 up to 5.5.3-tuxcare.2, plus listed versions 5.5.3 |
5.5.3-tuxcare.2 |
@faker-js/fakerTuxCare:npm |
10.4.0-tuxcare.0 up to 10.4.0-tuxcare.1, plus listed versions 10.4.0 |
10.4.0-tuxcare.1 |
@faker-js/fakernpm |
before 10.5.0 | 10.5.0 |
@faker-js/fakerRoot:npm |
before 7.6.0-aikido.1 | 7.6.0-aikido.19.9.0-aikido.1 |
@rootio/faker-js__fakerRoot:npm |
before 7.6.0-root.io.1 | 7.6.0-root.io.19.9.0-root.io.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-73231 is a high vulnerability (CVSS 7.8) in Faker-js Faker, published August 11, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.21%, the 11th percentile. Fixed in @faker-js/faker 10.5.0.
References
github.com/faker-js/faker/security/advisories/GHSA-qxc2-j82w-r537
github.com/faker-js/faker/pull/3852
github.com/faker-js/faker/commit/54586208f904012f57c50b46cc1ad32bcbe4bfb7
github.com/faker-js/faker/releases/tag/v10.5.0
nvd.nist.gov/vuln/detail/CVE-2026-73231
github.com/advisories/GHSA-qxc2-j82w-r537
github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73231.json
github.com/faker-js/faker