From dc95902e56b4917417fdc2eca03b8cb1a9b2a168 Mon Sep 17 00:00:00 2001
From: Slavomir
Using them on user-provided values will result in an XSS.
+Using them on user-provided values will result in an opportunity for XSS.
diff --git a/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql b/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql index 3cef4f1e035..9b0c37676ab 100755 --- a/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql +++ b/ql/src/experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql @@ -42,10 +42,9 @@ class PassthroughTypeName extends string { * output of the templates. */ class FlowConfFromUntrustedToPassthroughTypeConversion extends TaintTracking::Configuration { - string dstTypeName; + PassthroughTypeName dstTypeName; FlowConfFromUntrustedToPassthroughTypeConversion() { - dstTypeName instanceof PassthroughTypeName and this = "UntrustedToConversion" + dstTypeName } @@ -105,11 +104,10 @@ class FlowConfPassthroughTypeConversionToTemplateExecutionCall extends TaintTrac isSourceConversionToPassthroughType(source, _) } - private predicate isSourceConversionToPassthroughType(DataFlow::TypeCastNode source, string name) { + private predicate isSourceConversionToPassthroughType(DataFlow::TypeCastNode source, PassthroughTypeName name) { exists(Type typ | typ = source.getResultType() and - typ.getUnderlyingType*().hasQualifiedName("html/template", name) and - name instanceof PassthroughTypeName + typ.getUnderlyingType*().hasQualifiedName("html/template", name) ) }