n/a · Vulnerability
cve-program · CVE-2021-32546
PublishedMissing input validation in internal/db/repo_editor.go in Gogs before 0.12.8 allows an attacker to execute code remotely. An unprivileged attacker (registered user) can overwrite the Git configuration in his repository. This leads to Remote Command Execution, because that configuration can contain an option such as sshCommand, which is executed when a master branch is a remote branch (using an ssh:// URI). The remote branch can also be configured by editing the Git configuration file. One can create a new file in a new repository, using the GUI, with "\" as its name, and then rename this file to .git/config with the custom configuration content (and then save it).
Read the publisher's advisoryeuvd · EUVD-2022-5932
PublishedMissing input validation in internal/db/repo_editor.go in Gogs before 0.12.8 allows an attacker to execute code remotely. An unprivileged attacker (registered user) can overwrite the Git configuration in his repository. This leads to Remote Command Execution, because that configuration can contain an option such as sshCommand, which is executed when a master branch is a remote branch (using an ssh:// URI). The remote branch can also be configured by editing the Git configuration file. One can create a new file in a new repository, using the GUI, with "\" as its name, and then rename this file to .git/config with the custom configuration content (and then save it).
Read the publisher's advisorynvd · CVE-2021-32546
PublishedMissing input validation in internal/db/repo_editor.go in Gogs before 0.12.8 allows an attacker to execute code remotely. An unprivileged attacker (registered user) can overwrite the Git configuration in his repository. This leads to Remote Command Execution, because that configuration can contain an option such as sshCommand, which is executed when a master branch is a remote branch (using an ssh:// URI). The remote branch can also be configured by editing the Git configuration file. One can create a new file in a new repository, using the GUI, with "\" as its name, and then rename this file to .git/config with the custom configuration content (and then save it).
Read the publisher's advisoryosv · GHSA-56j7-2pm8-rgmx
Published### Impact The 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. ### Patches Repository file updates are prohibited to its `.git` directory. Users should upgrade to 0.12.8 or the latest 0.13.0+dev. ### Workarounds N/A ### References N/A ### For more information If you have any questions or comments about this advisory, please post on #6555.
Read the publisher's advisoryosv · GO-2022-0471
PublishedOS Command Injection in gogs in gogs.io/gogs
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2021-32546 · CVE overview and exploitation status
cve-program · CVE-2021-32546
- https://github.com/gogs/gogs/releases
- https://github.com/gogs/gogs/security/advisories/GHSA-56j7-2pm8-rgmx
euvd · EUVD-2022-5932
- https://github.com/gogs/gogs/releases
- https://github.com/gogs/gogs/security/advisories/GHSA-56j7-2pm8-rgmx
nvd · CVE-2021-32546
- https://github.com/gogs/gogs/releases
- https://github.com/gogs/gogs/security/advisories/GHSA-56j7-2pm8-rgmx
osv · GHSA-56j7-2pm8-rgmx
- 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
osv · GO-2022-0471
- 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/blob/f36eeedbf89328ee70cc3a2e239f6314f9021f58/conf/app.ini#L127-L129
- https://github.com/gogs/gogs/issues/6555
- https://github.com/gogs/gogs/pull/6986
- https://github.com/gogs/gogs/releases
- https://github.com/gogs/gogs/releases/tag/v0.12.8
Related changes
Linked by CVE identifierNo related changes are available here.