VYPR
Critical severityNVD Advisory· Published Nov 24, 2020· Updated Aug 4, 2024

CVE-2020-28991

CVE-2020-28991

Description

Gitea 0.9.99 through 1.12.x before 1.12.6 does not prevent a git protocol path that specifies a TCP port number and also contains newlines (with URL encoding) in ParseRemoteAddr in modules/auth/repo_form.go.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Gitea before 1.12.6 allows remote code execution via URL-encoded newlines in git protocol paths with a TCP port, enabling command injection.

Vulnerability

CVE-2020-28991 is an input validation flaw in Gitea's ParseRemoteAddr function within modules/auth/repo_form.go. In versions 0.9.99 through 1.12.x before 1.12.6, the function fails to sanitize URL-encoded newline characters (%0A or %0D%0A) when a git protocol path includes a TCP port number [1]. This allows an attacker to inject arbitrary newline sequences into the remote address.

Exploitation

An attacker can craft a malicious git remote URL that includes a TCP port and URL-encoded newlines. For example, a repository URL like git://host:port%0Acommand would be parsed without stripping the newline, potentially causing the application to interpret the subsequent text as separate commands or arguments. The attack does not require authentication if the attacker can influence a remote URL, such as through repository creation or modification requests that are processed by the server.

Impact

Successful exploitation could lead to arbitrary command execution on the Gitea server. By injecting newlines, an attacker may break out of the intended git invocation and execute shell commands with the privileges of the Gitea process. This could result in full compromise of the server, including data exfiltration, service disruption, or lateral movement within the network.

Mitigation

The vulnerability is fixed in Gitea version 1.12.6, which disallows URL-encoded newlines in git protocol paths that include a port number [3][4]. Users are strongly advised to upgrade to 1.12.6 or later. No workarounds have been publicly documented, and the issue is addressed by the patch merged in pull request #13525 [4].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/go-gitea/giteaGo
>= 0.9.99, < 1.12.61.12.6

Affected products

3

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.