Race Condition Enabling Link Following Affecting github.com/gogs/gogs/internal/route/repo package, versions >=0.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMGOGSGOGSINTERNALROUTEREPO-8383161
  • published 17 Nov 2024
  • disclosed 15 Nov 2024
  • credit Unknown

How to fix?

There is no fixed version for github.com/gogs/gogs/internal/route/repo.

Overview

Affected versions of this package are vulnerable to Race Condition Enabling Link Following in the editFilePost() function's handling of symlinks to nonexistent files. The /:username/:reponame/_edit/:branch/:filepath endpoint may accept such a link to a nonexistent file, and an attacker who can place a malicious server-side Git hook in the target repository can cause its contents to be triggered when the repo is modified. The attacker must have permissions to push to a repository and edit files via the web interface,

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
7.5 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    High
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None