Propose adding a `/api/userPreferences` endpoint that allows a naive recursive merge of user-sent JSON, which could lead to prototype pollution. This would create a new challenge for users to exploit a common Node.js bug.
# :star: Challenge idea ### Description While digging into the codebase I noticed `b2bOrder.ts` uses `notevil` to eval user input and it got me thinking about prototype pollution. Right now there's no challenge around it, which feels like a gap since it's a real and common Node.js bug. The idea is simple add a `/api/userPreferences` endpoint that does a naive recursive merge of whatever JSON the user sends. No `__proto__` filtering, no `hasOwnProperty` check. A player who figures out to send `{"__proto__": {"isAdmin": true}}` poisons the whole server's prototype chain and can access something they shouldn't. ### Underlying vulnerability/ies - **CWE-1321** - Prototype Pollution - **OWASP A03:2021** - Injection - Same root cause as CVE-2019-10744 in lodash, CVE-2019-11358 in jQuery ### Expected difficulty | :heavy_check_mark: / :x: | Difficulty | |:------------------------:|:-------------------------------------| | :x: | :star: