Create express-lfr.yaml

patch-1
Prince Chaddha 2022-12-22 16:56:45 +05:30 committed by GitHub
parent cd2bc92191
commit d58633485a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
id: express-lfr
info:
name: Express LFR
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:
- "$INP = <... \\$REQ\\.\\$QUERY ...>\\;"
- "$RES\\.render\\(\\$VIEW, <... \\$INP ...>\\)"
- "$RES.render\\($VIEW, <... $REQ.$QUERY.$FOO ...>\\)"
- "$RES\\.render\\(\\$VIEW, <... \\$REQ\\.\\$BODY ...>\\)"
condition: or