# Restrict claim task REST API

**URL:** <https://forum.camunda.io/t/restrict-claim-task-rest-api/30688>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [October 18, 2021, 3:02pm UTC](https://forum.camunda.io/t/restrict-claim-task-rest-api/30688 "2021-10-18T15:02:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jominga](https://forum.camunda.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@jominga](https://forum.camunda.io/u/jominga)\
**Post date:** [October 18, 2021, 3:02pm UTC](https://forum.camunda.io/t/restrict-claim-task-rest-api/30688/1 "2021-10-18T15:02:57Z")

</div>

Hello,

I am working on a Camunda Project and I just found a big vulnerability in it.  
Users are able to claim and unclaim tasks. The problem comes after a user unclaims a task, since they are able to use the following REST Call to claim it again:

POST `/task/{id}/claim`  
Body: {“userId”: “someOtherUsersId”}

With this they can specify another user and claim the task for them instead, which is not desirable.

Is there a way to restrict the claim endpoint to only work if the caller of the request is authenticated as the same user specified in the body? At least if that user is not the admin.

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 1:29pm UTC](https://forum.camunda.io/t/restrict-claim-task-rest-api/30688/2 "2024-01-30T13:29:54Z")

</div>

Closed on January 30, 2024, 1:29pm UTC


