You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Media endpoint has no path sanitization - authenticated arbitrary file read from GitHub repos #396
The media endpoint (packages/outstatic/src/app/api/media/index.ts) has zero sanitization on mediaPath. In legacy mode, mediaPath is interpolated into https://raw.githubusercontent.com/${mediaPath} and fetched server-side with the user GitHub OAuth token.
Vulnerability
An authenticated user can craft arbitrary paths to read files from any GitHub repository their token has access to, including private repos. For example: /api/outstatic/media/private-org/private-repo/main/secrets.env
This is distinct from GHSA-7jvc-9xq8-frff (REST proxy token leak to non-GitHub origins). That advisory covers the REST proxy. This finding covers the media endpoint allowing arbitrary repo path traversal.
Impact
Authenticated arbitrary file read from GitHub repositories, including private repos the user token can access.
Fix
Validate mediaPath against the configured repo owner/slug. Reject paths containing .. or not matching expected repo.
AI issue report. This issue has been reported previously, it's not a real vulnerability or it overstates the seriousness or likelihood of it happening.
Activity
avitorio commentedon Sep 23, 2026
AI issue report. This issue has been reported previously, it's not a real vulnerability or it overstates the seriousness or likelihood of it happening.