Skip to content
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

CLOUDP-298151: Fix SSRF Vulnerability in MongoDB Atlas CLI Integration #3600

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

Conversation

lamcodeofpwnosec
Copy link

@lamcodeofpwnosec lamcodeofpwnosec commented Feb 2, 2025

Proposed changes

Jira ticket: CLOUDP-298151

Closes #3599

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

Further comments

  • isSafeURL function: This function validates that the URL provided is not an internal or unsafe address. It checks if the URL uses a safe scheme (e.g., http, https), and it ensures the host does not belong to known private IP ranges or local addresses.

  • URL Validation in CreateIntegration: Before proceeding with the integration creation, the WebhookURL (or any URL input) is validated with the isSafeURL function. If the URL is found to be unsafe, it returns an error and does not proceed with creating the integration.

CWE-918

@lamcodeofpwnosec lamcodeofpwnosec requested a review from a team as a code owner February 2, 2025 15:20
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.

SSRF Vulnerability in MongoDB Atlas CLI Integration /integrations/org/customer_id
2 participants