---
id: "CVE-2026-120725"
page: "https://infrastack.ai/live/CVE-2026-120725"
kind: "vulnerability"
aliases: ["CVE-2026-120725", "GHSA-8pmc-9g44-v9gw"]
title: "Anonymous Git LFS downloads bypass REQUIRE_SIGNIN_VIEW"
severity: "low"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "gitea.dev", "fixed": ["28.4.0"], "affected": "<= 28.3.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cwe-306", "git-lfs", "gitea", "package", "self-hosted"]
not_affected_if: ["default-config", "lfs-disabled", "private-repos-only"]
published_at: "2026-11-15T21:03:20+00:00"
first_seen_at: "2026-11-15T21:12:46+00:00"
updated_at: "2026-11-15T21:14:15+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-8pmc-9g44-v9gw", "first_seen_at": "2026-11-15T21:12:46+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120725", "first_seen_at": "2026-11-15T22:40:23+00:00"}]
exploit_sources: []
---

# Anonymous Git LFS downloads bypass REQUIRE_SIGNIN_VIEW

Link for people: https://infrastack.ai/live/CVE-2026-120725 (this .md is for agents)

On Gitea instances with REQUIRE_SIGNIN_VIEW enabled, the Git LFS routes still serve objects from non-private repositories to clients with no account. An attacker who knows the owner/repo path and an object's SHA-256 can download that file anonymously.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:gitea.dev affected <= 28.3.0 fixed 28.4.0

## How to check

- Check the `[service]` section of `app.ini` for `REQUIRE_SIGNIN_VIEW = true` and `LFS_START_SERVER = true`.
- Check the Gitea version with `gitea --version`; versions `<= 28.3.0` are affected.
- If `LFS_ALLOW_PURE_SSH = true`, the SSH LFS path is also affected.

## Fix

- Gitea `28.4.0`

## Timeline

- 2026-11-15T21:12:46+00:00 ghsa-repo https://github.com/go-gitea/gitea/security/advisories/GHSA-8pmc-9g44-v9gw
- 2026-11-15T22:40:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120725

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/go-gitea/gitea/security/advisories/GHSA-8pmc-9g44-v9gw
- [fix] Release notes: github.com https://github.com/go-gitea/gitea/releases/tag/v28.4.0

## From the sources

On an instance with `[service] REQUIRE_SIGNIN_VIEW = true`, the Git LFS routes still serve objects to clients with no account. Anyone who knows a non-private repository's `owner/repo` path and a file's SHA-256 can download that LFS object with `GET /{owner}/{repo}.git/info/lfs/objects/{oid}`. The web UI, the API and `git clone` all refuse the same client. The attached reproducer sets up alice's non-private repository `alice/firmware` with one LFS file, shows the anonymous API request getting 403 and `info/refs` getting 401, and then shows the anonymous LFS GET returning 200 with exactly the bytes alice downloads with her own credentials.

The cause is `authenticate()` in `services/lfs/server.go`, reached with `requireSigned = false` from the download, batch, upload and verify handlers. It returns early when the anonymous doer's permission allows reading. The permission model grants `AccessModeRead` to a nil user on any non-private repository of a public owner, and it only consults `REQUIRE_SIGNIN_VIEW` for restricted users. The LFS routes are registered with `optSignInFromAnyOrigin`, which carries no `SignInRequired`, so nothing on the LFS path checks the setting. The other read paths (web, API, git smart HTTP, SSH, packages) each check it at their own entry point.

The batch route with `"operation": "download"` also tells an anonymous client whether a given OID is stored in a repository, even without the correct size, since a wrong size returns 422. The attacker cannot discover paths or hashes from the instance; they must come from outside, for example LFS pointer files in a leaked or mirrored checkout or a published checksum. Private repositories and repositories of limited or private owners are not reachable, and write and lock operations still return 401.

With `LFS_ALLOW_PURE_SSH = true`, a restricted user or a deploy key of another repository can reach the same objects through `git-lfs-transfer`. This is a second route to the same anonymous read, closed by the same one-line fix. The early return dates from `bbad9b6178` (#5912, 2019). This is the LFS counterpart of the gaps already closed for packages (#20873) and the container registry (#28877).

## Details

The Git LFS routes do not honour `[service] REQUIRE_SIGNIN_VIEW = true`. A client without any credential downloads LFS
objects from non-private repositories of an instance that otherwise refuses every anonymous read.

- Commit: `31626de2a6cdd3e1fe93216e4ac80f511297f1e7`.
- Attacker: unauthenticated HTTP client that knows `owner/repo` and the SHA-256 (OID) of the object.
- Configuration: `REQUIRE_SIGNIN_VIEW = true` (default `false`; it is the setting being bypassed) and
  `LFS_START_SERVER = true` (code default `false`; the web installer writes `true`, `routers/install/install.go:332`).
- Entry points: `GET /{owner}/{repo}.git/info/lfs/objects/{oid}` and `POST /{owner}/{repo}.git/info/lfs/objects/batch`.

On such an instance, for the non-private repository `alice/firmware` and with no `Authorization` header or cookie:

```
GET /api/v1/repos/alice/firmware                               -> 403
GET /alice/firmware.git/info/refs?service=git-upload-pack      -> 401
GET /alice/firmware.git/info/lfs/objects/<sha256 of the file>  -> 200, the file
```

Every other read path enforces the setting at its own entry point: the web routes through `optSignIn`
(`SignInRequired: setting.Service.RequireSignInViewStrict`, `routers/web/web.go:348`), the API through
`verifyAuthWithOptionsAPI` (`routers/api/v1/api.go:1022`), packages in `determineAccessMode`
(`services/context/package.go:113`), SSH in `ServCommand` (`routers/private/serv.go:245`), and git smart HTTP with

```go
// routers/web/repo/githttp.go:129
	// Only public pulls don't need auth: repo must exist, not require-sign-in
	canAnonymousPull := false
	if isPull && repoExist && !setting.Service.RequireSignInViewStrict {
```

The LFS routes have no counterpart. They are registered with `optSignInFromAnyOrigin`, whose `VerifyOptions` carry no
`SignInRequired`, because LFS authenticates inside its handlers:

```go
// routers/web/web.go:325
var optSignInFromAnyOrigin = verifyAuthWithOptionsWeb(&common.VerifyOptions{DisableCrossOriginProtection: true})
// routers/web/web.go:1764
	common.AddOwnerRepoGitLFSRoutes(m, lfsServerEnabled, webAuth.AllowBasic, webAuth.AllowDeployToken, repo.CorsHandler(), optSignInFromAnyOrigin)
```

The handlers reach `authenticate` through `getAuthenticatedRepository`, which passes `requireSigned = false`
(`services/lfs/server.go:470`) for the download, batch, upload and verify routes. `authenticate` returns early on the
permission of the anonymous doer:

```go
// services/lfs/server.go:550
	// it works for both anonymous request and signed-in user, then perm.CanAccess will do the permission check
	perm, err := access_model.GetDoerRepoPermission(ctx, repository, ctx.Doer)   // ctx.Doer == nil
	…
	canAccess := perm.CanAccess(accessMode, unit.TypeCode)
	// if it doesn't require sign-in and anonymous user has access, return true
	…
	if canAccess && (!requireSigned || ctx.IsSigned) {
		return true
	}
```

The comment assumes the permission check covers the anonymous case, but the permission model does not know about the
setting for a nil doer: `GetIndividualUserRepoPermission` returns `AccessModeRead` for `user == nil` on any non-private
repository whose owner is public (`models/perm/access/repo_permission.go:465-468`). The setting is only consulted there
for restricted users (`models/perm/access/access.go:52`). So with no credentials `canAccess` is true for a read,
`requireSigned` is false, and the bearer-token check below is never reached. This early return is long-standing, not a
recent regression: it dates from `bbad9b6178` ("Fix bug when read public repo lfs file", #5912, 2019-01-31).

`DownloadHandler` (`services/lfs/server.go:117`) then streams the object. `BatchHandler` (`:192`) with
`"operation": "download"` answers per OID: a `download` action for an object the repository has, `"error": {"code": 404}`
for one it does not have, which lets the same client test whether a given file is stored in a given repository. The
size need not be known for this: a wrong size for a stored object is answered with `422` "Object <oid> is not N bytes"
(`services/lfs/server.go:254`), which also confirms presence. The
routes that need write access (`batch` with `upload`, `PUT`, `verify`) and the lock routes (`requireSigned = true`,
`services/lfs/locks.go:67`) answer 401 to the anonymous client.

Presenting credentials can reduce access on the same URL: a restricted user (`gitea admin user create --restricted`)
who sends Basic auth gets 401 for the GET above, because the restricted user's permission honours the setting; without
the header the answer is 200.

The same shortcut is reachable over pure-SSH LFS (`LFS_ALLOW_PURE_SSH = true`, default `false`). The internal LFS
routes build a web context that never has a doer (`routers/private/internal.go:105-108`), and `GiteaBackend.Download`
requests whatever `{owner}/{repo}.git/info/lfs/…` path the client put into the `id` argument
(`modules/lfstransfer/backend/backend.go:185`). This was exercised against the built-in SSH server, separately from the
shipped reproducer: a restricted user, and a read-only deploy key of `bob/tool`, are both refused
`git-lfs-transfer alice/pub.git download` ("has no "read" permission for alice/pub"), but inside a
`git-lfs-transfer` session on their own repository the packets `get-object <oid>` /
`id=base64({"download":{"href":"http://x/alice/pub.git/info/lfs/objects/<oid>"}})` return `status 200` and the file of
`alice/pub`. The session's LFS token is bound to the other repository and is never examined. This is a second route to
the same anonymous read, not an additional capability: the same person can send the anonymous HTTP request above. The
same fix closes both.

## Impact

The attacker needs no account, but must already know the repository path and the exact SHA-25

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
