JS: Block prototype pollution flow into this

This commit is contained in:
Asger Feldthaus
2021-11-03 13:33:50 +01:00
parent 08bc80ffdb
commit 712614a03c

View File

@@ -33,6 +33,8 @@ class Configuration extends TaintTracking::Configuration {
// Concatenating with a string will in practice prevent the string `__proto__` from arising.
node instanceof StringOps::ConcatenationRoot
or
node instanceof DataFlow::ThisNode
or
// Stop at .replace() calls that likely prevent __proto__ from arising
exists(StringReplaceCall replace |
node = replace and