Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a826c83 commit d49359aCopy full SHA for d49359a
1 file changed
javascript/ql/lib/semmle/javascript/security/dataflow/TaintedPathCustomizations.qll
@@ -847,6 +847,22 @@ module TaintedPath {
847
dst = call and
848
srclabel = dstlabel
849
)
850
+ or
851
+ exists(DataFlow::CallNode join |
852
+ // path.join() with spread argument
853
+ join = NodeJSLib::Path::moduleMember("join").getACall() and
854
+ src = join.getASpreadArgument() and
855
+ dst = join and
856
+ (
857
+ srclabel.(Label::PosixPath).canContainDotDotSlash()
858
859
+ srclabel instanceof Label::SplitPath
860
+ ) and
861
+ dstlabel.(Label::PosixPath).isNormalized() and
862
+ if isRelative(join.getArgument(0).getStringValue())
863
+ then dstlabel.(Label::PosixPath).isRelative()
864
+ else dstlabel.(Label::PosixPath).isAbsolute()
865
+ )
866
}
867
868
/**
0 commit comments