prototype汚染攻撃
#Node.js #セキュリティ #Deno
各種ランタイムでの対応
Deno
DenoではデフォルトでObject.prototype.__proto__が削除されています。(--unstable-sloppy-importsでこの挙動は無効化可能)
パッケージ
bourne
JSON.parse() drop-in replacement with prototype poisoning protection
fastifyが利用している。
各種パッケージにおける対応
deno_std/dotenv
fix(dotenv): prevent prototype pollution during parsing (#6661)
参考
JavaScript Prototype Poisoning Vulnerabilities in the Wild
JavaScriptのプロトタイプ汚染攻撃対策は難しい