Gitea Local File Inclusion Vulnerability Under Investigation
Gitea's restore-repo command is reportedly vulnerable to local file inclusion via file:// URI, potentially allowing arbitrary file exfiltration.
What happened
Gitea's restore-repo command processes release.yml files from user-supplied archives. The DownloadURL field in each release attachment is passed to uri.Open() without scheme validation. This appears to allow an attacker to exfiltrate arbitrary files from the server filesystem using a file:// URI.
The vulnerability affects go-gitea/gitea versions up to and including v1.22.x, as well as the master branch as of the latest commit. The issue is tracked under GHSA-5GGR-2F2H-JMVM.
It is recommended to upgrade to a version of Gitea that includes the fix for this vulnerability and review any release attachments for unauthorized content. For more details, consult the primary source at https://github.com/go-gitea/gitea/security/advisories/GHSA-5ggr-2f2h-jmvm.
How 0Day mitigates this
go-gitea/gitea is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.