@@ -137,7 +137,7 @@ module ZipFile {
137
137
* zipfile.ZipFile()
138
138
* ```
139
139
*/
140
- private API:: Node zipFileClass ( ) {
140
+ API:: Node zipFileClass ( ) {
141
141
result =
142
142
[
143
143
API:: moduleImport ( "zipfile" ) .getMember ( "ZipFile" ) ,
@@ -253,7 +253,8 @@ module ZipFile {
253
253
*/
254
254
predicate isAdditionalTaintStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
255
255
exists ( API:: Node zipFileInstance | zipFileInstance = zipFileClass ( ) |
256
- nodeFrom = zipFileInstance .getACall ( ) .getParameter ( 0 , "file" ) .asSink ( ) and
256
+ nodeFrom =
257
+ [ zipFileInstance .getACall ( ) .getParameter ( 0 , "file" ) .asSink ( ) , zipFileInstance .getACall ( ) ] and
257
258
nodeTo =
258
259
[
259
260
sink ( zipFileInstance ) .getACall ( ) ,
@@ -317,7 +318,8 @@ module TarFile {
317
318
318
319
predicate isAdditionalTaintStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
319
320
exists ( API:: Node tarfileInstance | tarfileInstance = tarfileInstance ( ) |
320
- nodeFrom = tarfileInstance .getACall ( ) .getParameter ( 0 , "name" ) .asSink ( ) and
321
+ nodeFrom =
322
+ [ tarfileInstance .getACall ( ) .getParameter ( 0 , "name" ) .asSink ( ) , tarfileInstance .getACall ( ) ] and
321
323
nodeTo =
322
324
tarfileInstance .getReturn ( ) .getMember ( [ "extractall" , "extract" , "extractfile" ] ) .getACall ( )
323
325
)
@@ -497,6 +499,10 @@ module BombsConfig implements DataFlow::ConfigSig {
497
499
)
498
500
or
499
501
source instanceof FileAndFormRemoteFlowSource:: FastAPI
502
+ or
503
+ source = TarFile:: tarfileInstance ( ) .getACall ( )
504
+ or
505
+ source = ZipFile:: zipFileClass ( ) .getACall ( )
500
506
}
501
507
502
508
predicate isSink ( DataFlow:: Node sink ) {
0 commit comments