krypton-org / krypton-auth

Express authentication middleware, using GraphQL and JSON Web Tokens.
https://krypton-org.github.io/krypton-auth
MIT License
9 stars 0 forks source link

Merging Javascript objects can be dangerous #10

Closed jrebecchi closed 4 years ago

jrebecchi commented 4 years ago

When setting up the middleware config, check if the merge between user attributes and default config can lead to a prototype pollution: "recursively merging a user-controlled object into another object can allow an attacker to modify the built-in Object prototype." https://help.semmle.com/wiki/display/JS/Prototype+pollution

jrebecchi commented 4 years ago

Indeed, the merge was not safe. Corrected by PR 59.