{"id":"GHSA-56j7-2pm8-rgmx","revision":"fc3df4e113dd4d30a0f7e90810b5fd64","records":[{"revision":"fc3df4e113dd4d30a0f7e90810b5fd64","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-56j7-2pm8-rgmx","aliases":["CVE-2021-32546","GO-2022-0471"],"title":"OS Command Injection in gogs","description":"### Impact\n\nThe malicious user is able to update a crafted `config` file into repository's `.git` directory with to gain SSH access to the server. All installations with [repository upload enabled (default)](https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129) are affected.\n\n### Patches\n\nRepository file updates are prohibited to its `.git` directory. Users should upgrade to 0.12.8 or the latest 0.13.0+dev.\n\n### Workarounds\n\nN/A\n\n### References\n\nN/A\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on #6555.\n","state":0,"publishedAt":"2022-06-02T20:52:23+00:00","modifiedAt":"2026-07-08T06:27:32.3769816+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.12.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-56j7-2pm8-rgmx","https://nvd.nist.gov/vuln/detail/CVE-2021-32546","https://github.com/gogs/gogs/issues/6555","https://github.com/gogs/gogs/pull/6986","https://github.com/gogs/gogs","https://github.com/gogs/gogs/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129","https://github.com/gogs/gogs/releases","https://github.com/gogs/gogs/releases/tag/v0.12.8"],"sourceUrl":"https://github.com/advisories/GHSA-56j7-2pm8-rgmx","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-56j7-2pm8-rgmx","identifiers":["GHSA-56j7-2pm8-rgmx","CVE-2021-32546","GO-2022-0471"]},"retained":false,"historicalAffected":[]}],"coverage":[]}