mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The scoped importer, reached by POST /api/import/zip and the importScoped method, authorized the import on boardId alone. The listId and swimlaneId beside it were written onto the new cards as given, and a cardId was looked up with no board filter, so a writer of board A could create cards on A whose list and swimlane were board B's, and could probe whether a card id existed on a board they cannot see. Before anything is written, the list, swimlane and card are now looked up together with the board's id; an id of another board is refused (400 over REST, error-import-placement from the method), with the same answer for a foreign card and a missing one. Cards are placed only by what was found on the board. A refusal is recorded in Admin Panel / Problems as ImportPlacementBleed (authz.import-placement), without blocking the account. Tests: the decision with the reporter's ids, the check before every write, a negative scan for a target id written or looked up without the board, and a browser test of the reporter's attack by both routes, which fails on the previous code. Thanks to Zachariah Mithani (AploSec) and xet7 !