isSanitizerGuard is not works, what should i do? #15543
-
|
I'm a fishman who learning about codeql to find vulnerabilities for nodejs express My nodejs snippet like below It has a flow path from express of req to exec. But req.query has been sanitized by validateFileName function. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It looks like |
Beta Was this translation helpful? Give feedback.
It looks like
exec(cmdAddZip)is being executed even if!validateFileName(zipfilename)is true. I think you need to add anelseblock to the if statement where you cllexec(cmdAddZip).