CVE-2026-73231: Faker: helpers.fake exploitable into arbritary code execution

Published Aug 11, 2026
·
Updated

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

ts 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.

Other sources

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.

— NVD

Affected Software

2 affected componentsFixes available
Faker Faker<10.5.0
npm/@faker-js/faker<=10.4.0
10.5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@faker-js/faker to a version that resolves this vulnerability.

    Fixed in 10.5.0
  2. Upgrade

    Upgrade fakerjs to a version that resolves this vulnerability.

    Fixed in 10.5.0

Event History

Aug 11, 2026
CVE Published
via MITRE·07:28 PM
Data Sourced
via MITRE·07:28 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:18 PM
DescriptionSeverityWeakness
Sep 2, 2026
Advisory Published
via GitHub·02:20 PM
Data Sourced
via GitHub·02:20 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-73231?

CVE-2026-73231 has a severity rating of high with a score of 7.8.

2

What vulnerability does CVE-2026-73231 describe?

CVE-2026-73231 describes a vulnerability in the Faker library that allows arbitrary code execution through the helpers.fake method.

3

How do I fix CVE-2026-73231?

To fix CVE-2026-73231, update Faker to version 10.5.0 or later.

4

What components are affected by CVE-2026-73231?

CVE-2026-73231 affects the Faker library used in both browser and Node.js environments.

5

Can CVE-2026-73231 be exploited remotely?

Yes, CVE-2026-73231 can be exploited remotely since it allows attacker-controlled templates to execute arbitrary code.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203