CVE-2022-42968

Gitea before 1.17.3 does not sanitize and escape refs in the git backend

Critical · published October 16, 2022

CVSS v3.1
9.8
EPSS
1%
Percentile
72.2
In the wild
Unconfirmed
What it is

🔥 A crafty command injection vulnerability in Gitea before version 1.17.3 can lead to serious mischief by mishandling arguments in git commands! Think of it like a restaurant kitchen where the chef mistakenly assumes all orders are safe, leading to a surprise ingredient in your dish! Instead of ensuring only the right commands are cooked up, Gitea’s git backend is accidentally serving up whatever an attacker wants. An attacker could potentially execute arbitrary commands on the server, leading to complete control over the environment. This could mean deleting critical files, stealing sensitive data, or even deploying malicious software—absolutely devastating for any operations relying on Gitea!

Put simply

Think of it like a restaurant kitchen where the chef mistakenly assumes all orders are safe, leading to a surprise ingredient in your dish! Instead of ensuring only the right commands are cooked up, Gitea’s git backend is accidentally serving up whatever an attacker wants. This vulnerability allows unsanitized and unescaped references to be passed to git commands, enabling command injection on servers running an affected version of Gitea.

What to do

An attacker could potentially execute arbitrary commands on the server, leading to complete control over the environment. This could mean deleting critical files, stealing sensitive data, or even deploying malicious software—absolutely devastating for any operations relying on Gitea! Upgrade Gitea to version 1.17.3 or later immediately to mitigate this vulnerability. Additionally, review your server configurations and command execution policies to ensure all inputs are properly sanitized and authenticated. It's time to secure your environment! You’ve got this! Follow these steps and lock down your Gitea installation to achieve hero status in security! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01398 · 72.2th percentile
Published
2022-10-16T00:00Z
EPSS history
Timeline
  • 16 OCT 00:00Z
    Gitea before 1.17.3 does not sanitize and escape refs in the git backend
    cvelistv5