CVE-2022-1884

CRITICAL
Published Nov 15, 2024 Modified Nov 19, 2024 CWE-78 CWE-77

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.

Is your site exposed to CVE-2022-1884?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

9.8
CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness Type (CWE)

CWE-78 OS Command Injection
CWE-77 CWE-77

Affected Products

Vendor Product
gogs gogs
microsoft windows

References

Frequently Asked Questions

What is CVE-2022-1884? +
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. It has a CVSS v3.1 base score of 9.8 (CRITICAL).
How severe is CVE-2022-1884? +
CVE-2022-1884 has a CVSS v3.1 score of 9.8 out of 10, rated CRITICAL. This is a critical vulnerability that should be patched immediately.
What products are affected by CVE-2022-1884? +
CVE-2022-1884 affects products from gogs, microsoft, specifically: gogs, windows. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2022-1884? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2022-1884 — free, no signup required.