Missing input validation in internal/db/repo_editor.go in Gogs before 0.12.8 allows an attacker to execute…
Historical advisory recorded 24 Oct 2026 18:17:28 UTC. Read the latest advisory.
nvd · 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 advisoryAffected versions, risk and source history
nvd · CVE-2021-32546
PublishedNVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: NVD-CWE-noinfo
Original publisher date fields
published: 2022-06-02T14:15:28.587
lastModified: 2026-06-17T03:53:08.963
1 source CPE criteria · context only
- cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
Original source record · Cite this exact observation · Complete original publisher JSON