Security mailing lists by PureSourceCode

CVE-2022-1884

CRITICAL 9.8CVSS 3.1

OS Command Injection in gogs

A remote command execution vulnerability exists in gogs/gogs versions <=0.12.7 when deployed on a Windows server. The vulnerability arises due to improper validation of the tree_path parameter during file uploads. An attacker can set tree_path=.git. to upload a file into the .git directory, allowing them to write or rewrite the .git/config file. If the core.sshCommand is set, this can lead to remote command execution.

Published
15 Nov 2024
Last modified
17 Jun 2026
Assigned by
security@huntr.dev
NVD status
Analyzed
Weakness
CWE-77CWE-78
Also known as
GHSA-958j-443g-7mm7GO-2022-0749
Sources
NVDJSONOSV GHSA-958j-443g-7mm7JSONOSV GO-2022-0749JSON

Scores

SourceScored byVersionScoreVector / decision
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 CRITICAL 10.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD security@huntr.dev (Secondary) CVSS 3.0 CRITICAL 10.0 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
OSV GitHub CVSS 3.0 CRITICAL 10.0 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected

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

References

History

  • 25 Nov 2026 20:56 UTC · NVD: first stored (published 15 Nov 2024)
  • 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.