-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Add taint step for handlebars model #8430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks OK, but I got some comments.
The autoformatter is failing on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did an evaluation.
(nightly-old
+ a bunch of random projects that use handlebars.compile(..
).
I'm a bit worried about false flow in the case where we don't know the template string, but otherwise LGTM.
…o flow to helpers
javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/handlebars.js
Show resolved
Hide resolved
@erik-krogh I think I've addressed all concerns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This adds a taint step that has been missing in the handlebars templating library. Passing data to a template may flow to custom 'helpers'. See the attached test and predicate documentation for details :)
Related CVE:
CVE-2022-24718
DCA
Experiment looking good.