Skip to content

fix/security: do not serve arbitrary files over network with serve-git#1350

Merged
cbrnrd merged 1 commit into
mainfrom
carterbrainerd-vuln-99-src-serve-git-exposes-arbitrary-files-under-repos-without
Jul 8, 2026
Merged

fix/security: do not serve arbitrary files over network with serve-git#1350
cbrnrd merged 1 commit into
mainfrom
carterbrainerd-vuln-99-src-serve-git-exposes-arbitrary-files-under-repos-without

Conversation

@cbrnrd

@cbrnrd cbrnrd commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR removes a http.FileServer fallback in the serve-git command. This fallback allows anyone with network access to the machine running the server to read arbitrary files in the file root, even if they are gitignored or not in a git repository.

Test plan

  • CI
  • local e2e test succeeded cloning all of my dev repos:
    • Screenshot 2026-07-07 at 11 04 19 AM

@andreeleuterio andreeleuterio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just make sure to test e2e with a local instance

@cbrnrd

cbrnrd commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@andreeleuterio see PR description, tested locally and verified

@cbrnrd cbrnrd merged commit e6945cf into main Jul 8, 2026
8 checks passed
@cbrnrd cbrnrd deleted the carterbrainerd-vuln-99-src-serve-git-exposes-arbitrary-files-under-repos-without branch July 8, 2026 17:57
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.

3 participants