Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Sn0w3y
Copy link

@Sn0w3y Sn0w3y commented Dec 12, 2025

Describe the pull request

Added a security check to UpdateRepoFile method in repo_editor.go to prevent symlink attacks. Before writing to a file, it now checks if the target path is a symlink. This change addresses CVE-2025-8110 by ensuring that attackers cannot exploit the API to write through symlinks to sensitive files, such as .git/config, thereby enhancing the security of the repository editing process.

Link to the issue: https://nvd.nist.gov/vuln/detail/CVE-2025-8110

Checklist

  • [x ] I agree to follow the Code of Conduct by submitting this pull request.
  • [x ] I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan.

Added a security check to `UpdateRepoFile` method in `repo_editor.go` to prevent symlink attacks. Before writing to a file, it now checks if the target path is a symlink. This change addresses CVE-2025-8110 by ensuring that attackers cannot exploit the API to write through symlinks to sensitive files, such as `.git/config`, thereby enhancing the security of the repository editing process.
@Sn0w3y Sn0w3y requested a review from unknwon as a code owner December 12, 2025 11:39
@cfi-gb cfi-gb mentioned this pull request Dec 16, 2025
1 task
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