Skip to content

Conversation

@doublethink
Copy link
Contributor

@doublethink doublethink commented Nov 10, 2025

Issue within the user supplied queue name parameter
Fixes SEC-583


Note

Introduces shared queue name schema/validation, replaces queryName with queueName, and validates names across queue APIs before executing SQL.

  • Validation:
    • Add QueryNameSchema and isQueueNameValid in Queues.utils.
    • Apply QueryNameSchema to CreateQueueSheet form name.
  • API updates:
    • Standardize parameter from queryName to queueName in message actions and hooks.
    • Add queue name validation to mutations/queries: archive, read, delete, send, purge, metrics, and messages infinite query; block invalid names before SQL.
  • UI wiring:
    • Update MessageDetailsPanel actions to pass queueName.
  • Misc:
    • Refactor metrics SQL builders into functions (preciseMetricsSqlQuery, estimateMetricsSqlQuery).

Written by Cursor Bugbot for commit b465a92. This will update automatically on new commits. Configure here.

@doublethink doublethink requested a review from a team as a code owner November 10, 2025 03:11
@supabase
Copy link

supabase bot commented Nov 10, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel
Copy link

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
studio-self-hosted Ready Ready Preview Comment Nov 10, 2025 9:20am
studio-staging Ready Ready Preview Comment Nov 10, 2025 9:20am
6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
studio Ignored Ignored Nov 10, 2025 9:20am
cms Skipped Skipped Nov 10, 2025 9:20am
design-system Skipped Skipped Nov 10, 2025 9:20am
docs Skipped Skipped Nov 10, 2025 9:20am
ui-library Skipped Skipped Nov 10, 2025 9:20am
zone-www-dot-com Skipped Skipped Nov 10, 2025 9:20am

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Studio E2E Results

  • Total: 1
  • Passed: 1
  • Failed: 0
  • Skipped: 0
  • Timed out: 0
  • Interrupted: 0
  • Flaky: 0
  • Duration: 2.6s

Artifacts: https://github.com/supabase/supabase/actions/runs/19226474033

Last updated: Monday 10, November, 2025 10:05:12 (UTC)

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

'Invalid queue name: must contain only alphanumeric characters, underscores, and hyphens'
)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: SQL Injection Through Unvalidated Inputs

The payload and delay parameters are directly interpolated into the SQL query without validation or proper escaping, creating SQL injection vulnerabilities. While queueName is now validated, user-controlled payload strings and numeric delay values can be exploited to inject malicious SQL. The same pattern affects messageId and duration parameters in other mutations.

Fix in Cursor Fix in Web

@ivasilov ivasilov changed the title Fix/validation input fix: Validate queue names Nov 10, 2025
@ivasilov ivasilov merged commit 4c4083b into master Nov 10, 2025
22 of 24 checks passed
@ivasilov ivasilov deleted the fix/validation-input branch November 10, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants