{"id":"CVE-2026-73231","aliases":["CVE-2026-73231","GHSA-qxc2-j82w-r537"],"related":[],"kind":"vulnerability","state":"published","title":"Faker: helpers.fake exploitable into arbritary code execution","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Faker genera cantidades masivas de datos falsos en el navegador y Node.js. Antes de la versión 10.5.0, el método faker.helpers.fake en src/modules/helpers/eval.ts permite que plantillas falsas controladas por el atacante accedan al constructor Function a través de fakeEval.resolveProperty cuyo una función devuelve otra función, lo que permite la ejecución arbitraria de código JavaScript. Este problema se corrigió en la versión 10.5.0.","source":"nvd"}],"published":"2026-08-11T19:28:44.943Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-95"],"affected":[{"ranges":[{"version":"< 10.5.0","status":"affected"}],"vendor":"faker-js","product":"faker","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"10.5.0"}],"ecosystem":"npm","package":"@faker-js/faker","purl":"pkg:npm/%40faker-js/faker","source":"ghsa"}],"references":[{"url":"https://github.com/faker-js/faker/security/advisories/GHSA-qxc2-j82w-r537","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/faker-js/faker/pull/3852","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/faker-js/faker/commit/54586208f904012f57c50b46cc1ad32bcbe4bfb7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/faker-js/faker/releases/tag/v10.5.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73231","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/faker-js/faker","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-08-13T14:41:05.021Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-73231","url":"https://www.cve.org/CVERecord?id=CVE-2026-73231","licence":"CVE Terms of Use","modified":"2026-08-13T14:41:25.803Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qxc2-j82w-r537","url":"https://github.com/advisories/GHSA-qxc2-j82w-r537","licence":"CC-BY-4.0","modified":"2026-09-02T14:30:05.884Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-73231","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73231","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.512Z","epss":{"score":0.00217,"percentile":0.12955,"date":"2026-12-01T12:00:22.000Z"}}