22 lines
634 B
YAML
22 lines
634 B
YAML
id: tar-path-overwrite
|
|
|
|
info:
|
|
name: Tar Path Overwrite
|
|
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
|
severity: info
|
|
description: Insecure TAR archive extraction can result in arbitrary path over write and can result in code injection.
|
|
tags: file,nodejs
|
|
|
|
file:
|
|
- extensions:
|
|
- all
|
|
|
|
matchers:
|
|
- type: regex
|
|
regex:
|
|
- "require\\('tar-stream'\\)"
|
|
- "[\\w\\W]+?\\.createWriteStream\\([\\w\\W]*?\\, [\\w\\W]*?\\)"
|
|
- "[\\w\\W]+?\\.writeFile\\([\\w\\W]*?\\, [\\w\\W]*?\\)"
|
|
- "[\\w\\W]+?\\.writeFileSync\\([\\w\\W]*?\\, [\\w\\W]*?\\)"
|
|
condition: or
|