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.

Subscriptions

Vendors Products
Microsoft Subscribe
Windows Subscribe

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-958j-443g-7mm7 OS Command Injection in gogs
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 19 Nov 2024 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Microsoft
Microsoft windows
Weaknesses CWE-77
CPEs cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Vendors & Products Microsoft
Microsoft windows

Fri, 15 Nov 2024 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Gogs
Gogs gogs
CPEs cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*
Vendors & Products Gogs
Gogs gogs
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 15 Nov 2024 11:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Remote Command Execution in gogs/gogs
Weaknesses CWE-78
References
Metrics cvssV3_0

{'score': 10, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2024-11-15T19:15:02.353Z

Reserved: 2022-05-25T12:20:16.450Z

Link: CVE-2022-1884

cve-icon Vulnrichment

Updated: 2024-11-15T19:14:57.455Z

cve-icon NVD

Status : Analyzed

Published: 2024-11-15T11:15:07.803

Modified: 2024-11-19T14:47:48.443

Link: CVE-2022-1884

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses