cve.bz

CVE-2022-1884

9.8 criticalEPSS 1.8%

Critical (9.8) in gogs gogs. EPSS 1.8% chance of exploitation in the next 30 days. Fixed in gogs.io/gogs 0.12.8.

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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.8% chance of exploitation in the next 30 days; higher than 78% of CVEs (scores of 2026-10-31)
CWEs
CWE-77, CWE-78
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-958j-443g-7mm7Gogogs.io/gogs<0.12.80.12.8
GO-2022-0749Gogogs.io/gogs<0.12.80.12.8

References

Check your stackJSON