PT-2026-63293 · Gitea+1 · Gitea+1

·

CVE-2026-58420

·

Published

2026-07-21

·

Updated

2026-08-26

CVSS v4.0

6.7

Medium

VectorAV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions Gitea versions 1.22.x and earlier
Description A Local File Inclusion issue exists in the restore-repo command when processing release.yml files from user-supplied archives. The DownloadURL field in release attachments is passed to the uri.Open() function without scheme validation. Since uri.Open() supports the file:// scheme via os.Open(), an attacker with operator-level access can use a crafted release.yml to exfiltrate arbitrary files accessible to the Gitea process user from the server filesystem. These files are then stored as release attachments and can be retrieved via the Gitea API. The issue is rooted in the uri.Open() function within modules/uri/uri.go and its invocation in services/migrations/gitea uploader.go.
Recommendations Update Gitea to a version later than 1.22.x. In services/migrations/gitea uploader.go, validate that the DownloadURL scheme is restricted to http or https before calling uri.Open(). As a temporary workaround, restrict the execution of the restore-repo command to fully trusted operators and manually audit archive contents before restoration.

Exploit

Fix

DoS

Improper Access Control

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-58420
GHSA-5GGR-2F2H-JMVM
GO-2026-6032
OPENSUSE-SU-2026:21483-1

Affected Products

Gitea
Red Os