Open
Conversation
🟡 Please give this pull request extra attention during review.This pull request contains multiple security vulnerabilities related to the MarkNotificationAsRead mutation, specifically an Insecure Direct Object Reference (IDOR) issue that allows unauthorized users to modify notification read status without proper authentication or ownership verification.
🟡 Potential IDOR Vulnerability in
|
| Vulnerability | Potential IDOR Vulnerability |
|---|---|
| Description | This is a potential IDOR vulnerability because the code does not verify the user's ownership or permission to modify the specific notification. The mutation simply finds a notification by ID and marks it as read without checking if the current user has the right to perform this action. An attacker could potentially mark any notification as read by knowing or guessing its ID, which could lead to unauthorized information access or modification. |
🟡 Code Policy: graphql-auth-check
| Policy | graphql-auth-check |
|---|---|
| Result | The new MarkNotificationAsRead mutation bypasses authentication. While the BaseMutation class provides authorization capabilities through its authorize method, the new mutation does not implement any authentication or authorization checks. It allows direct modification of notification records without verifying the user's identity or permissions. |
Insecure Direct Object Reference (IDOR) in app/graphql/mutations/notifications/mark_notification_as_read.rb
| Vulnerability | Insecure Direct Object Reference (IDOR) |
|---|---|
| Description | The mutation allows marking any notification as read without verifying user ownership. By calling the mutation with any notification ID, an authenticated user can modify notifications they do not own. This occurs because the code lacks a user-specific authorization check before updating the notification's read status. |
All finding details can be found in the DryRun Security Dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.