Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. code.gitea.io/gitea
  4. ›
  5. CVE-2026-58435

CVE-2026-58435: Gitea LFS Deploy-Key Privilege Escalation

July 21, 2026

Gitea’s LFS server (services/lfs/server.go:268) uses the UserID embedded in an LFS JWT to make cross-repository authorization decisions via LFSObjectAccessible(). This would be safe if the JWT UserID always matched the actual requesting principal — but for deploy keys, routers/private/serv.go:275 sets UserID = repo.OwnerID instead of any identity representing the deploy key itself. As a result, an attacker who holds a write deploy key for any single repo owned by a victim can obtain a legitimate JWT (via the standard SSH git-lfs-authenticate flow) that Gitea will honor as if the victim themselves were making the request. The attacker can then exfiltrate LFS objects from any private repo the victim owns — no admin credentials, no server secrets, no brute force required. If the victim is a site administrator, every LFS object on the entire Gitea instance is reachable. Deploy keys exist precisely to grant narrow, single-repo access to CI/CD systems; this vulnerability defeats that isolation entirely for LFS data.

References

  • github.com/advisories/GHSA-rh79-75qm-gwjr
  • github.com/go-gitea/gitea/releases/tag/v1.27.0
  • github.com/go-gitea/gitea/security/advisories/GHSA-rh79-75qm-gwjr
  • nvd.nist.gov/vuln/detail/CVE-2026-58435

Code Behaviors & Features

Detect and mitigate CVE-2026-58435 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.27.0

Fixed versions

  • 1.27.0

Solution

Upgrade to version 1.27.0 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-266: Incorrect Privilege Assignment
  • CWE-639: Authorization Bypass Through User-Controlled Key

Source file

go/code.gitea.io/gitea/CVE-2026-58435.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:14 +0000.