I reproduced a $10,000 bug
文章描述了一个Express服务器因使用过时的deep-extend模块导致的原型污染漏洞。攻击者通过注入__proto__字段篡改isAdmin属性,成功获取管理员权限,凸显了原型污染攻击的潜在风险。 2025-6-8 05:41:35 Author: infosecwriteups.com(查看原文) 阅读量:11 收藏

phoenixcatalan

🎭 “I wasn’t an admin… until I became one with just a JSON object.”

An Express server. An innocent isAdmin field. And a hacker who hijacks it through a simple __proto__. Welcome to the world of Prototype Pollution.

🎬 The Setup

It all starts with a small, seemingly harmless Node.js application. Users can update their profiles via a POST request to /update-profile.

Under pressure, the developer uses a popular module to merge objects: deep-extend. A classic choice.

But by using an outdated, vulnerable version, they unknowingly opened a dangerous backdoor.

🧨 The Vulnerability: Prototype Pollution

Here’s the issue: some JavaScript libraries allow you to inject properties into the global object prototype, impacting every object in the application.

To successfully exploit prototype pollution, an attacker typically needs three things:

  1. A pollution source — Input that lets them inject arbitrary properties into prototypes (e.g., __proto__, constructor, prototype).
  2. A sink — A function or behavior in the app that uses those polluted properties (like eval, DOM manipulation, or access checks).
  3. An exploitable gadget — A…

文章来源: https://infosecwriteups.com/i-reproduced-a-10-000-bug-28466603e45e?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh