{"id":"GHSA-qxc2-j82w-r537","revision":"bf310bf617dc4718bcf1ab9eae41c93d","records":[{"revision":"bf310bf617dc4718bcf1ab9eae41c93d","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-qxc2-j82w-r537","aliases":["CVE-2026-73231"],"title":"Faker: helpers.fake exploitable into arbritary code execution","description":"### 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.","state":0,"publishedAt":"2026-09-02T14:20:14+00:00","modifiedAt":"2026-09-02T14:30:05.8844305+00:00","affected":[{"ecosystem":"npm","name":"@faker-js/faker","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"10.5.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/faker-js/faker/security/advisories/GHSA-qxc2-j82w-r537","https://nvd.nist.gov/vuln/detail/CVE-2026-73231","https://github.com/faker-js/faker/pull/3852","https://github.com/faker-js/faker/commit/54586208f904012f57c50b46cc1ad32bcbe4bfb7","https://github.com/faker-js/faker","https://github.com/faker-js/faker/releases/tag/v10.5.0"],"sourceUrl":"https://github.com/advisories/GHSA-qxc2-j82w-r537","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qxc2-j82w-r537","identifiers":["GHSA-qxc2-j82w-r537","CVE-2026-73231"]},"retained":false,"historicalAffected":[]}],"coverage":[]}