#0504
Your template engine merges a trusted base context with a user-supplied context using `Object.assign`.
Because `Object.assign` copies enumerable own properties, an attacker can craft a JSON body whose parsed form contains a `__proto__` string key (via `JSON.parse`) and pollute Object.prototype when that key is then spread.
Template engines that accept user-controlled context objects are a prime vector. A single polluted property can change the rendering behaviour for every subsequent template in the process.
buildContext({title:'Home'}, {"__proto__":{"isAdmin":true}})// throws: 'Prototype pollution detected'
buildContext({title:'Home'}, {user:'alice'})// returns: {title:'Home', user:'alice'}