mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
GHSA-3vjg-3p4q-8fwh. The REST card DELETE looked the card up on the board the caller was authorised for, destroyed its checklists, checklist items, comments, attachments and subcards by cardId, and removed the card itself last, keyed on that board and list. A move to another board landing in between left the card alive on a board the deleter cannot read, stripped of every child, with both requests answering 200 (CWE-367). Every hooked removal had the same shape: collection-hooks runs Cards.before.remove (where the cascade was) and then removes by the caller's original selector - by swimlane, delete batch or parent - which a moved card no longer matches. The custom-field link clean-up did the same to the cards linked to it. The card document is now the claim (models/lib/claimedCardRemoval.js): the single and bulk REST deletes remove the card first and cascade only when that removal matched, and the hooked removals cascade from Cards.after.remove only when the card is really gone. A list deletion removes a card only while it is still in that list. The REST board move that loses to a delete is a 404 instead of a 500 from cardMove. A delete that lost the race, or arrived after the card was moved away from the named board, is refused and recorded in Admin Panel / Problems as RaceBleed (authz.card-delete-race, medium, never disables the account): a stale view is not an attack, and PurgeBleed's critical record used to disable the member who deleted a card somebody had just moved. tests/claimedCardRemoval.test.cjs replays the reported race and scans server/ for any cascade before or without the card's removal; tests/playwright/specs/race-bleed.e2e.js races 12 moves against deletes and checks that a surviving card always keeps its checklist. Thanks to xingmuse and xet7 !