# Gitea: SSRF via Migration Asset Downloads Bypasses hostmatcher — Reads Internal Files and Cloud Metadata

Advisory record · `GHSA-2wm4-vwp6-v7xc`

- **Identifiers:** `GHSA-2wm4-vwp6-v7xc` · `BIT-gitea-2026-34966` · `CVE-2026-34966` · `CVE-2026-59765` · `GO-2026-6039`
- **State:** Confirmed
- **Severity:** CVSS 8.3 High
- **Critical:** No
- **Weakness (CWE):** [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
- **Tags:** [Server-side request forgery (SSRF)](https://agentprime.io/advisories/tag/ssrf.md)
- **Published:** 21 Jul 2026
- **Updated:** 14 Oct 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 21 Jul 2026, 21:55 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `code.gitea.io/gitea` (Go): affected `<1.27.0`; fixed in `1.27.0`
- `gitea.dev` (Go): affected `<1.27.0`; fixed in `1.27.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Gitea versions before 1.27.0 (packages code.gitea.io/gitea and gitea.dev) have a server-side request forgery flaw in migration asset downloads and some OAuth paths, which use plain HTTP requests that skip the project's internal-address protection and also accept file:// URLs. An attacker who can start a migration (admin or organization owner rights) or who controls an admin-configured custom OAuth2 source could read local files and reach internal or cloud metadata services. Upgrade to Gitea 1.27.0 or later.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.3 High, CVSS 4.0: `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N`, from CNA (VulnCheck)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0039, the 33rd percentile, on 12 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 5 Aug 2026, 20:28 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2026-34966)
- 31 Oct 2026, 14:12 UTC: First seen by agentprime
- 31 Oct 2026, 14:12 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-2wm4-vwp6-v7xc)

## Sources

- [GitHub Advisory Database: GHSA-2wm4-vwp6-v7xc](https://github.com/advisories/GHSA-2wm4-vwp6-v7xc)
- [OSV: GHSA-2wm4-vwp6-v7xc](https://osv.dev/vulnerability/GHSA-2wm4-vwp6-v7xc)
- <https://github.com/go-gitea/gitea/security/advisories/GHSA-2wm4-vwp6-v7xc>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59765>
- <https://github.com/go-gitea/gitea/commit/de4b8277e9cb576f2315fb03b5ab6478b42a1d31>
- <https://blog.gitea.com/gitea-1.27.0-is-released>
- <https://github.com/go-gitea/gitea>
- <https://github.com/go-gitea/gitea/releases/tag/v1.27.0>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-2wm4-vwp6-v7xc>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-2wm4-vwp6-v7xc/>. Everything for agents: <https://agentprime.io/llms.txt>.
