PolicyEngine / PolicyEngine/policyengine-uk-chat

Conversation IDOR

Open
#131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
Avg merge
16h 46m
Merged PRs (30d)
2

Description

Problem

Conversation endpoints appear to trust request-supplied identifiers instead of enforcing ownership from authenticated identity.

Observed behavior:

  • GET /conversations/{id} and DELETE /conversations/{id} do not check ownership.
  • Conversation list, share, and report flows use caller-supplied user_id, so ownership checks are spoofable.

Risk

A caller can potentially read, delete, share, or report conversations they do not own by changing path IDs or supplied user_id values.

Expected behavior

Conversation authorization should be based on the verified authenticated user, not a caller-supplied user identifier.

Acceptance criteria

  • Backend derives user identity from a verified auth token.
  • GET, DELETE, list, share, and report conversation endpoints enforce ownership or explicit share permissions.
  • Caller-supplied user_id is not accepted as proof of identity.
  • Regression tests cover wrong-user access attempts for each affected endpoint.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the conversation GET, DELETE, list, share, and report endpoints and the verified-auth-token handling. Add regression tests for wrong-user access to each affected endpoint, including attempts using caller-supplied user_id values. Done means ownership or explicit share permissions are enforced consistently across all listed flows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, authorization, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.