Skip to content

fix(auth): prevent users from gaining additional permissions - #330

Merged
Bohreromir merged 2 commits into
mainfrom
fix-trino-permission-escalation
Oct 5, 2026
Merged

Bohreromir merged 2 commits into
mainfrom
fix-trino-permission-escalation

Conversation

@Bohreromir

Copy link
Copy Markdown
Member

Users were able to pose as any other user in trino queries.
Can be done by logging in as bob and executing

await fetch('/api/auth/update-user', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  credentials: 'include',
  body: JSON.stringify({ username: 'alice' })
});

in the browser console.
The fix prevents the username to be changed

@Bohreromir
Bohreromir marked this pull request as ready for review September 24, 2026 09:29
@Bohreromir Bohreromir moved this to Development: Waiting for Review in Stackable Engineering Sep 24, 2026
@dervoeti dervoeti moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Sep 25, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 50.87% 2495 / 4904
🔵 Statements 57.03% 3712 / 6508
🔵 Functions 65.89% 1028 / 1560
🔵 Branches 43.02% 1299 / 3019
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/server/auth.ts 56.52% 38.46% 16.66% 68.42% 7, 8, 9, 12, 63-83
Generated in workflow #1031 for commit 3bb6186 by the Vitest Coverage Report Action

@Bohreromir
Bohreromir merged commit 5fc67f2 into main Oct 5, 2026
13 checks passed
@Bohreromir
Bohreromir deleted the fix-trino-permission-escalation branch October 5, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

2 participants