Repository navigation
Fix cross-project checklist item ownership check (IDOR) - #17
Merged
Merged
Conversation
updateItem and deleteItem checked that the task belongs to the caller's project, but fetched/mutated the target item by bare id without also verifying it belongs to the checklist named in the URL. A caller with write access to their own task could hijack and reparent an arbitrary item from a checklist belonging to a different project by guessing its UUID. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
updateItemanddeleteItemverified that the task in the URL belongs to the caller's project, but then fetched/mutated the target item by bareid, without checking that the item actually belongs to thechecklistIdin the URL. A caller with write access to their own task could hijack and reparent an arbitrary item from a checklist belonging to a completely different project, just by guessing its UUID.Fix
Added a
checklistOwnedByTaskcheck before both handlers touch the item, and scoped theupdateItemfetch/delete/re-insert queries bychecklist_id(not justid) as defense-in-depth.Also bumps the plugin's patch version in
plugin.json.Verification
go test ./...andgo vet ./...pass, including two new regression tests for the cross-project case.🤖 Generated with Claude Code