Skip to content

fix arbitrary code execution via mongostory route #136

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

odaysec
Copy link

@odaysec odaysec commented Jun 11, 2025

Ticket 🎟️ #135

Fix the issue need to eliminate the use of eval and ensure that the query value is processed in a secure manner. Instead of dynamically executing the query string, we can parse and validate the input to ensure it adheres to a predefined structure or set of allowed operations. This can be achieved by:

  1. Defining a whitelist of allowed operations or query types.
  2. Parsing the query value and validating it against the whitelist.
  3. Executing the validated query using MongoDB's API directly, without relying on eval.

The changes will involve:

  • Removing the eval call.
  • Adding validation logic for the query input.
  • Executing the query securely using MongoDB's API.

@odaysec odaysec requested a review from a team as a code owner June 11, 2025 09:37
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