Skip to content

Commit 712614a

Browse files
committed
JS: Block prototype pollution flow into this
1 parent 08bc80f commit 712614a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/PrototypePollutingAssignmentQuery.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Configuration extends TaintTracking::Configuration {
3333
// Concatenating with a string will in practice prevent the string `__proto__` from arising.
3434
node instanceof StringOps::ConcatenationRoot
3535
or
36+
node instanceof DataFlow::ThisNode
37+
or
3638
// Stop at .replace() calls that likely prevent __proto__ from arising
3739
exists(StringReplaceCall replace |
3840
node = replace and

0 commit comments

Comments
 (0)