Prototype Pollution: Examples

Prototype pollutionExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

  • Imagine that an application uses an object to maintain configuration settings, like this:

    js
    let config = {
        isAdmin: false
    };
  • An attacker might be able to add an isAdmin property to Object.prototype, like this:

    js
    Object.prototype.isAdmin = true;

Comments

No comments yet.