Skip to content

Commit 1db6a64

Browse files
committed
only block flow for dominated reads when the property name is known
1 parent a9062cc commit 1db6a64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

javascript/ql/lib/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,10 @@ module TaintTracking {
551551
or
552552
// reading from a tainted object yields a tainted result
553553
succ.(DataFlow::PropRead).getBase() = pred and
554-
not AccessPath::DominatingPaths::hasDominatingWrite(succ) and
554+
not (
555+
AccessPath::DominatingPaths::hasDominatingWrite(succ) and
556+
exists(succ.(DataFlow::PropRead).getPropertyName())
557+
) and
555558
not isSafeClientSideUrlProperty(succ) and
556559
not ClassValidator::isAccessToSanitizedField(succ)
557560
or

0 commit comments

Comments
 (0)