Merge pull request #12668 from asgerf/js/jquery-callback-sinks

JS: fix handling of jQuery sinks involving callback
This commit is contained in:
Asger F
2023-03-30 12:42:53 +02:00
committed by GitHub
5 changed files with 38 additions and 0 deletions

View File

@@ -122,6 +122,14 @@ class Configuration extends TaintTracking::Configuration {
TaintedUrlSuffix::step(src, trg, TaintedUrlSuffix::label(), DataFlow::FlowLabel::taint()) and
inlbl = TaintedUrlSuffix::label() and
outlbl = prefixLabel()
or
exists(DataFlow::FunctionNode callback, DataFlow::Node arg |
any(JQuery::MethodCall c).interpretsArgumentAsHtml(arg) and
callback = arg.getABoundFunctionValue(_) and
src = callback.getReturnNode() and
trg = callback and
inlbl = outlbl
)
}
}