Skip to content

security: require token auth for org metadata and team list - #8336

Merged
unknwon merged 2 commits into
mainfrom
GHSA-744x-3838-5r56
Jun 7, 2026
Merged

unknwon merged 2 commits into
mainfrom
GHSA-744x-3838-5r56

Conversation

@unknwon

@unknwon unknwon commented Jun 7, 2026

Copy link
Copy Markdown
Member

Describe the pull request

The /api/v1/orgs/:orgname route group missed the reqToken() middleware that every other authenticated API group already applies. As a result, GET /api/v1/orgs/:orgname, PATCH /api/v1/orgs/:orgname, and GET /api/v1/orgs/:orgname/teams were reachable without authentication. The team list endpoint in particular leaked team names, descriptions, and permission levels to any unauthenticated caller, useful for mapping organizational structure and planning privilege escalation.

Refs GHSA-744x-3838-5r56.

Checklist

Test plan

  1. Create an organization with at least one custom team.
  2. Without authentication, run curl -i http://localhost:3000/api/v1/orgs/<org>/teams.
  3. Before this change: 200 OK with the team list in the body.
  4. After this change: 401 Unauthorized.
  5. Repeat with a valid Authorization: token <token> header and confirm the team list is still returned.
  6. Repeat steps 3 and 5 against GET /api/v1/orgs/<org> and confirm the same gating.

@unknwon unknwon added this to the 0.14.3 milestone Jun 7, 2026
@unknwon
unknwon merged commit 2ebc0e2 into main Jun 7, 2026
8 checks passed
@unknwon
unknwon deleted the GHSA-744x-3838-5r56 branch June 7, 2026 03:33
unknwon added a commit that referenced this pull request Jun 7, 2026
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.

1 participant

⌂ 换网址