CVE-2026-73231

Faker: helpers.fake exploitable into arbritary code execution

Published Aug 11, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The faker.helpers.fake method in older versions of the faker-js:faker library allowed attacker‑controlled fake templates to invoke the JavaScript Function constructor through the fakeEval.resolveProperty helper. This enabled the execution of arbitrary JavaScript code when a function returned another function. The issue is a classic code‑injection flaw (CWE‑94 and CWE‑95) and can lead to full compromise of the JavaScript environment in which Faker is executed.

Affected Systems

Any Node.js or browser application that imports faker-js:faker prior to version 10.5.0 and uses the helpers.fake API is affected. Versions prior to 10.5.0 are vulnerable; all releases starting with 10.5.0 contain the fix.

Risk and Exploitability

The CVSS score of 7.8 assigns high severity. The EPSS score of less than 1% suggests a very low likelihood of real‑world exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is inferred to be template injection: an attacker must supply a malicious fake template string or otherwise influence the template passed to helpers.fake, which is then evaluated with the Function constructor. No external network channel is required, so the vulnerability is likely limited to contexts where template strings can be injected or crafted by an attacker.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade faker-js:faker to version 10.5.0 or later.
  • Avoid using the helpers.fake API in production or replace it with safer data‑generation routines.
  • If upgrading immediately is not possible, remove any attacker‑controllable input from the parameters passed to helpers.fake or sandbox the evaluation context to prevent access to the Function constructor.

Generated by OpenCVE AI on August 14, 2026 at 01:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qxc2-j82w-r537 Faker: helpers.fake exploitable into arbritary code execution
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Faker-js
Faker-js faker
Vendors & Products Faker-js
Faker-js faker
Type Values Removed Values Added
Description 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.
Title Faker: helpers.fake exploitable into arbritary code execution
Weaknesses CWE-95
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 13, 2026, 2:41 PM
Reserved
Aug 11, 2026, 2:41 PM
Status
Deferred
Published
Aug 11, 2026, 8:18 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 11, 2026, 7:28 PM