Skip to content

[High] Open GraphQL proxy: anyone with the URL could delete all tasks #73

Open

Description

@CAMIANAIS

What I liked

  • Your token is not VITE_, so it's not in the browser bundle where anyone could read it. It stays on the server (vite.config.ts:27-41). I hadn't even thought about this for my own project.
  • Filters live in the URL, so they survive a refresh and you can share them.

Problem

Any user's tasks could be deleted. In the worst case, someone with the URL deletes all tasks.

Root cause

api/graphql.ts forwards any request body and adds the token, but it doesn't check who is calling. You mention this risk in README.md:45.

Proposed fix

  • Allow only requests from your own site (Origin check). This stops other websites, but not scripts like curl.
  • Allow only the queries and mutations the app uses (allowlist). This is the stronger lock.

Acceptance criteria

  • A request the app doesn't use is rejected.
  • Normal app requests still work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions