Security mailing lists by PureSourceCode

CVE-2021-32546

HIGH 8.8CVSS 3.1

OS Command Injection in gogs

Missing 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).

Published
2 Jun 2022
Last modified
8 Jul 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-78
Also known as
GHSA-56j7-2pm8-rgmxGO-2022-0471
Sources
NVDJSONOSV GHSA-56j7-2pm8-rgmxJSONOSV GO-2022-0471JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 6.5 AV:N/AC:L/Au:S/C:P/I:P/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD gogs gogs
cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*
< 0.12.8 0.12.8
OSV Go gogs.io/gogs < 0.12.8 0.12.8

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 2 Jun 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Aug 2024)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 2 Jun 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.