/

CVE-2026-58423

Severity:

HIGH RISK

(7.7)

Auth Bypass (CWE-287) in Git LFS SSH Sub-Verb Handling

CVE-2026-58423

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized Access to Private Repository Data

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An authentication bypass in Git LFS handling over SSH allows attackers to abuse malformed SSH sub-verbs to gain unauthorized read access.

When SSH-based LFS operations do not correctly enforce authentication and verb parsing, private repositories can be exposed to unauthorized clients.

Affected context

This vulnerability arises in environments where Git repositories expose Large File Storage (LFS) endpoints over SSH and rely on sub-verb parsing to route requests.

It is most relevant when SSH commands or sub-commands are used to differentiate between standard Git operations and LFS-specific traffic.

Misinterpretation or incomplete validation of malformed SSH sub-verbs can allow LFS read operations to proceed without the expected authentication gates, particularly in deployments that share infrastructure between public and private repositories.

Exploit preconditions

  • Attack surface: SSH-accessible Git/LFS endpoints exposed over the network.
  • Required access: Ability to initiate SSH connections to the repository host; no valid repository credentials are required if the bypass is triggered successfully.
  • Trigger point: Submission of specially crafted or malformed SSH sub-verbs intended for LFS operations.
  • Why exploitation is possible: The SSH command router or LFS handler incorrectly treats certain malformed sub-verb combinations as authorized or fails to re-check authentication before serving LFS objects.

Why this happens

The underlying issue stems from incomplete or inconsistent authentication enforcement in SSH command handling logic.

When sub-verbs are parsed to distinguish LFS actions from standard Git operations, malformed or unexpected values are not properly validated, resulting in an authentication bypass consistent with CWE-287.

Instead of enforcing a single, centralized check for authorization, the system effectively trusts that reaching a given code path implies prior authentication, allowing cleverly crafted sub-verbs to slip through the intended controls.

Potential impact

  • Unauthorized parties may read LFS-stored files from private repositories.
  • Sensitive intellectual property or configuration data could be exposed.
  • Repository metadata and structure can be inferred based on accessible LFS objects.
  • Downstream systems depending on LFS-stored assets may leak additional contextual information.

General mitigation guidance

Mitigation patterns focus on centralizing and hardening authentication checks for SSH-based commands and LFS endpoints.

Robust designs ensure that:

  • Every LFS operation is gated by explicit authentication and authorization decisions, independent of sub-verb formatting.
  • SSH command parsing treats malformed or unknown sub-verbs as invalid and rejects them early.
  • Authorization logic is based on repository identity and user permissions rather than solely on accepted command patterns.
  • Privilege boundaries between standard Git operations and LFS-specific routes are clearly defined and validated on each request.

How teams detect issues like this

Detection efforts can emphasize:

  • Static or manual review of SSH command routers, hooks, and LFS handlers to confirm that all paths perform explicit authentication checks.
  • Logging and monitoring of unusual SSH command lines or LFS requests, particularly those with malformed or unexpected sub-verbs.
  • Policy-based tests or security unit tests that attempt to access private LFS objects using intentionally malformed verb sequences.
  • Automated scanning tools configured to flag authorization decisions that depend on string pattern assumptions rather than explicit permission checks.

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-1.26.3-and-1.26.4/
github.comgithub.com/go-gitea/gitea/pull/38008
github.comgithub.com/go-gitea/gitea/releases/tag/v1.26.4
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-7wvc-rvp7-w99x

Frequently asked

questions

Yes, it can be exploited remotely by any attacker who can reach the SSH interface of the affected Git/LFS server.

The attacker needs only network access to the SSH endpoint; valid user credentials or repository access are not required if the malformed sub-verb bypass is successful.

Implement centralized, explicit authentication and authorization checks for every LFS request, and ensure SSH sub-verb parsing treats malformed or unexpected values as hard failures.

Standardize SSH command handling, enforce strict input validation for sub-verbs, and incorporate security-focused code reviews and tests that verify authentication is enforced on every reachable command path.

Find out what's already
exploitable in your codebase.