Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supabase client exposes schema details via hint and messages #1009

Open
2 tasks done
bombillazo opened this issue Apr 9, 2024 · 0 comments
Open
2 tasks done

supabase client exposes schema details via hint and messages #1009

bombillazo opened this issue Apr 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bombillazo
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

In our app, we manage everything with the service role from the backend. We've updated our database role privileges and grants so that the anon and authenticated roles cannot access the public and storage schemas since Supabase hardcodes these schemas as enabled in the client.

image

We use the client in our frontend app for authentication purposes using the anon_key. However, we noticed that even with the privileges revoked, even non-authenticated users could snoop using the different superbase client functions like select and rpc.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Use the supabase client
  2. Revoke access, privileges and grants from anon/authenticated DB roles
  3. Use any of the supabase client functions that query a table or call an RPC
  4. See response messages and hints

Expected behavior

We don't want any details leakage in our API, and the Supabase client unfortunately acts as a vector to snoop around with the anon key for API details.

Screenshots

image image image image

System information

  • Version of supabase-js: 2.42.0
@bombillazo bombillazo added the bug Something isn't working label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant