Title: [Low][server] File-route loader dataMiddlewares separate from middlewares → auth-bypass footgun · Issue #181 · bQuery/bQuery · GitHub
Open Graph Title: [Low][server] File-route loader dataMiddlewares separate from middlewares → auth-bypass footgun · Issue #181 · bQuery/bQuery
X Title: [Low][server] File-route loader dataMiddlewares separate from middlewares → auth-bypass footgun · Issue #181 · bQuery/bQuery
Description: Severity: 🟢 Low (authz footgun by omission) Location src/server/file-routes.ts:116-133. Description Action/HTML routes receive options.middlewares; the JSON loader endpoints receive a separate options.dataMiddlewares. A developer who pro...
Open Graph Description: Severity: 🟢 Low (authz footgun by omission) Location src/server/file-routes.ts:116-133. Description Action/HTML routes receive options.middlewares; the JSON loader endpoints receive a separate opti...
X Description: Severity: 🟢 Low (authz footgun by omission) Location src/server/file-routes.ts:116-133. Description Action/HTML routes receive options.middlewares; the JSON loader endpoints receive a separate opti...
Opengraph URL: https://github.com/bQuery/bQuery/issues/181
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Low][server] File-route loader dataMiddlewares separate from middlewares → auth-bypass footgun","articleBody":"## Severity: 🟢 Low (authz footgun by omission)\n\n## Location\n[`src/server/file-routes.ts:116-133`](../blob/main/src/server/file-routes.ts#L116-L133).\n\n## Description\nAction/HTML routes receive `options.middlewares`; the JSON loader endpoints receive a **separate** `options.dataMiddlewares`. A developer who protects mutations with `middlewares: [auth]` but forgets `dataMiddlewares` exposes every route's `load()` output as **unauthenticated JSON** at `${dataPath}\u003croute\u003e`. Because the loader mirrors the same data an authenticated page would render, this is a plausible authorization bypass introduced by omission rather than by a framework bug.\n\n## Suggested fix\nDefault `dataMiddlewares` to `middlewares` when unset (with an explicit opt-out), or apply a single `middlewares` chain to both surfaces. At minimum, document prominently that both must be supplied.\n\n---\n_Filed as part of a full-codebase security \u0026 correctness audit._\n","author":{"url":"https://github.com/JosunLP","@type":"Person","name":"JosunLP"},"datePublished":"2026-07-05T17:03:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/181/bQuery/issues/181"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f9aa4dbc-9cfb-9fec-33ba-7a8c0e9810b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B77E:2B8B4B:EB10AA:1429D62:6A4DEE01 |
| html-safe-nonce | 03a1f9c0b36f64bde599de901e8ab3535a25ceabc8134fbd4a1c64f658402069 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzdFOjJCOEI0QjpFQjEwQUE6MTQyOUQ2Mjo2QTRERUUwMSIsInZpc2l0b3JfaWQiOiI1MzUzMjY4NzkxNjYzNzgzNDI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f93cd60a27ae354e81fd3ec8749a54a325088b2969e24fa10dc597d7e31d0e64 |
| hovercard-subject-tag | issue:4813696605 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/bQuery/bQuery/181/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43b44db12cdafd147ac020a958dc74fb6fef03ca7c007f1012a271d78c955be5/bQuery/bQuery/issues/181 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43b44db12cdafd147ac020a958dc74fb6fef03ca7c007f1012a271d78c955be5/bQuery/bQuery/issues/181 |
| og:image:alt | Severity: 🟢 Low (authz footgun by omission) Location src/server/file-routes.ts:116-133. Description Action/HTML routes receive options.middlewares; the JSON loader endpoints receive a separate opti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JosunLP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width