Title: fix(credential-sets): security hardening by waleedlatif1 · Pull Request #5074 · simstudioai/sim · GitHub
Open Graph Title: fix(credential-sets): security hardening by waleedlatif1 · Pull Request #5074 · simstudioai/sim
X Title: fix(credential-sets): security hardening by waleedlatif1 · Pull Request #5074 · simstudioai/sim
Description: Summary GET /api/credential-sets/invitations returned every pending, unexpired link-only (null-email) invitation across all organizations, including the bearer token. Any authenticated user could enumerate those tokens and accept another org's invitation via POST /api/credential-sets/invite/[token] (which skips the email check when email IS NULL), joining that org's credential set — cross-tenant broken access control. Root cause: the isNull(email) branch in the listing's WHERE clause had no organization scoping, broadcasting open-invite tokens to everyone. Fix: scope the listing strictly to invitations addressed to the caller's own email. Open-link invites stay redeemable only via the out-of-band /credential-account/[token] URL, where possession of the unguessable token is the intended (and now non-enumerable) secret. Type of Change Bug fix (security — cross-tenant privilege escalation) Testing Tested manually. bun run check:api-validation passes; changed file typechecks clean. In-app "Pending Invitations" still lists email-addressed invites (token returned is the caller's own, and accept still enforces the email match). Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary GET /api/credential-sets/invitations returned every pending, unexpired link-only (null-email) invitation across all organizations, including the bearer token. Any authenticated user could ...
X Description: Summary GET /api/credential-sets/invitations returned every pending, unexpired link-only (null-email) invitation across all organizations, including the bearer token. Any authenticated user could ...
Opengraph URL: https://github.com/simstudioai/sim/pull/5074
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:55144c04-1938-9ed1-c431-6b9e190b309b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 80C8:3988A1:A39D6D:E0D339:6AFB5013 |
| html-safe-nonce | f697b395a6faddeabb558dae6e03f94cdc8aa97ddf04b6fcdf54f9cda9a53783 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEM4OjM5ODhBMTpBMzlENkQ6RTBEMzM5OjZBRkI1MDEzIiwidmlzaXRvcl9pZCI6IjgyOTkyOTUzMDc5MjU3NzAyNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 017e54b42b5ea31a75059f9f8aae9e8aee1827f8006f5568303d2181f45815a7 |
| hovercard-subject-tag | pull_request:3871694422 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5074/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary GET /api/credential-sets/invitations returned every pending, unexpired link-only (null-email) invitation across all organizations, including the bearer token. Any authenticated user could ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width