Skip to content

Conversation

@jorenbroekema
Copy link

@sei-vsarvepalli

Please take a look. I tried to incorporate the fix in the code and clean it up a little but I'm left with 2 failing tests, which also fail on your branch.
Need some helping fixing those tests (or implementation). then happy to merge.

jorenbroekema and others added 3 commits January 10, 2024 20:37
Co-authored-by: Vijay Sarvepalli <vssarvepalli@cert.org>
@jorenbroekema jorenbroekema mentioned this pull request Nov 25, 2025
// function definition is included in registered functions
if (Object.values(expr.functions).includes(f)) return true;
// marked as safe already
if (f.__expr_eval_safe_def) return true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is problematic we should remove it and move it to more reliable way. As this __expr_eval_safe_def can be user defined. It is not safe to trust it.

@sei-vsarvepalli
Copy link

Yeh - needs a little more work. I think

@sei-vsarvepalli

Please take a look. I tried to incorporate the fix in the code and clean it up a little but I'm left with 2 failing tests, which also fail on your branch. Need some helping fixing those tests (or implementation). then happy to merge.

See my https://github.com/sei-vsarvepalli/expr-eval-secure/tree/member-access branch that should fix all the tests and the more security problems that were found from using __expr_eval_safe_def property that can be object defined and NOT trusted.

Please test, fix any README's, indentation etc. and release at your convenience.

@sei-vsarvepalli
Copy link

Yeh - needs a little more work. I think

@sei-vsarvepalli
Please take a look. I tried to incorporate the fix in the code and clean it up a little but I'm left with 2 failing tests, which also fail on your branch. Need some helping fixing those tests (or implementation). then happy to merge.

See my https://github.com/sei-vsarvepalli/expr-eval-secure/tree/member-access branch that should fix all the tests and the more security problems that were found from using __expr_eval_safe_def property that can be object defined and NOT trusted.

Please test, fix any README's, indentation etc. and release at your convenience.

hello @jorenbroekema

Any questions? or any feedback you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants