Update zip-path-overwrite.yaml
parent
6f0d8062fe
commit
7246b17ecd
|
@ -4,7 +4,7 @@ info:
|
||||||
name: Zip Path Overwrite
|
name: Zip Path Overwrite
|
||||||
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
||||||
severity: info
|
severity: info
|
||||||
description: Insecure ZIP archive extraction can result in arbitrary path over write and can result in code injection.
|
description: Insecure ZIP archive extraction can result in arbitrary path overwrite and can result in code injection.
|
||||||
tags: file,nodejs
|
tags: file,nodejs
|
||||||
|
|
||||||
file:
|
file:
|
||||||
|
@ -14,15 +14,15 @@ file:
|
||||||
matchers:
|
matchers:
|
||||||
- type: regex
|
- type: regex
|
||||||
regex:
|
regex:
|
||||||
- "\\$X = require\\('unzip'\\)"
|
- "require\\('unzip'\\)"
|
||||||
- "\\$X = require\\('unzipper'\\)"
|
- "require\\('unzipper'\\)"
|
||||||
- "\\$Y\\.pipe\\(\\$UNZIP\\.Parse\\(...\\)\\)\\.on\\('entry', function $FUNC\\(...\\) {"
|
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.Parse\\([\\w\\W]*?\\)\\)\\.on\\('entry', function [\\w\\W]*?\\([\\w\\W]*?\\) \\{"
|
||||||
- "\\$X = \\$FILENAME\\.indexOf\\(...\\)"
|
- "[\\w\\W]+? = [\\w\\W]+?\\.indexOf\\([\\w\\W]*?\\)"
|
||||||
- "\\$FUNC\\.pipe\\(\\$FS\\.createWriteStream\\(\\$FIL, ...\\)\\)"
|
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.createWriteStream\\([\\w\\W]*?\\)\\)"
|
||||||
- "\\$FUNC\\.pipe\\(\\$FS\\.writeFile\\(\\$FIL, ...\\)\\)"
|
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.writeFile\\([\\w\\W]*?\\)\\)"
|
||||||
- "\\$FUNC\\.pipe\\(\\$FS\\.writeFileSync\\(\\$FIL, ...\\)\\)"
|
- "[\\w\\W]+?\\.pipe\\([\\w\\W]+?\\.writeFileSync\\([\\w\\W]*?\\)\\)"
|
||||||
- "\\$UNZIP\\.Parse\\(...\\)\\.on\\('entry', function \\$FUNC\\(\\$ENTRY\\) {"
|
- "[\\w\\W]+?\\.Parse\\([\\w\\W]*?\\)\\.on\\('entry', function [\\w\\W]*?\\([\\w\\W]*?\\) \\{"
|
||||||
- "\\$FS\\.createWriteStream\\(\\$FIL, ...\\)"
|
- "[\\w\\W]+?\\.createWriteStream\\([\\w\\W]*?\\)"
|
||||||
- "\\$FS\\.writeFile\\(\\$FIL, ...\\)"
|
- "[\\w\\W]+?\\.writeFile\\([\\w\\W]*?\\)"
|
||||||
- "\\$FS\\.writeFileSync\\(\\$FIL, ...\\)"
|
- "[\\w\\W]+?\\.writeFileSync\\([\\w\\W]*?\\)"
|
||||||
condition: or
|
condition: or
|
||||||
|
|
Loading…
Reference in New Issue