21 lines
714 B
YAML
21 lines
714 B
YAML
id: express-lfr
|
|
|
|
info:
|
|
name: Express - Local File Read
|
|
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
|
severity: info
|
|
description: Untrusted user input in express render() function can result in arbitrary file read if hbs templating is used.
|
|
tags: file,nodejs,express,lfr
|
|
|
|
file:
|
|
- extensions:
|
|
- all
|
|
|
|
matchers:
|
|
- type: regex
|
|
regex:
|
|
- "(\\$[\\w\\W]+?)\\.render\\(\\$[\\w\\W]+?, <[\\w\\W]+? \\\\$[\\w\\W]+? [\\w\\W]+? >\\)"
|
|
- "(\\$[\\w\\W]+?)\\.render\\(\\$[\\w\\W]+?, <[\\w\\W]+? \\\\$[\\w\\W]+?\\.\\$[\\w\\W]+? [\\w\\W]+? >\\)"
|
|
- "(\\$[\\w\\W]+?)\\.render\\(\\$[\\w\\W]+?, <[\\w\\W]+? \\\\$[\\w\\W]+? [\\w\\W]+? >\\)"
|
|
condition: or
|