/

CVE-2026-91923

Severity:

HIGH RISK

(7.7)

SSRF (CWE-918) in KubeSphere Git Credential Endpoint

CVE-2026-91923

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Service Access and Credential Disclosure

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

KubeSphere contains a server-side request forgery vulnerability in its Git credential verification endpoint because caller-supplied URLs are not sufficiently validated or restricted by an allowlist. An authenticated attacker may use the endpoint to access internal services and potentially obtain basic-auth credentials from Kubernetes Secrets through error responses.

Affected context

The issue occurs in KubeSphere deployments where the Git credential verification endpoint accepts user-controlled URLs and performs server-side requests without enforcing an approved destination policy. Risk is increased when the endpoint can reach internal cluster services and when error handling exposes authentication material associated with Secrets across namespaces.

Exploit preconditions

  • Attack surface: The Git credential verification endpoint exposed by the KubeSphere server
  • Required access: An authenticated account permitted to invoke the endpoint
  • Trigger point: Submission of a caller-controlled URL for credential verification
  • Why exploitation is possible: The server makes outbound requests without adequate URL validation or allowlist enforcement, and response errors may disclose basic-auth credentials retrieved from internal Secrets

Why this happens

The underlying bug is server-side request forgery, mapped to CWE-918. The endpoint treats a caller-supplied destination as trustworthy and initiates server-side network access without sufficiently constraining schemes, hosts, ports, redirects, or internal address ranges. In addition, unsafe error-response handling can turn data obtained from internal services into information disclosed to the authenticated caller.

Potential impact

  • An attacker may access internal HTTP services from the KubeSphere server's network position.
  • Internal service metadata or response contents could be disclosed.
  • Basic-auth credentials stored in Kubernetes Secrets could be exposed.
  • Compromised credentials could enable further access, lateral movement, or unauthorized repository activity.
  • Sensitive error information could assist follow-on attacks against cluster services.

General mitigation guidance

Mitigation generally focuses on reducing outbound request trust and preventing sensitive response data from reaching callers.

Common defensive patterns include:

  • Enforcing a strict destination allowlist based on approved schemes, hosts, ports, and paths.
  • Blocking loopback, link-local, private, and other reserved address ranges after DNS resolution.
  • Revalidating destinations across redirects and preventing DNS rebinding scenarios.
  • Applying network egress controls so the service can reach only required external and internal destinations.
  • Avoiding the inclusion of credentials, response bodies, or sensitive upstream details in user-visible errors.
  • Using least-privilege service accounts and narrowly scoped Secret access.
  • Treating endpoint-provided URLs as untrusted input throughout validation and request handling.

How teams detect issues like this

Detection approaches can include:

  • Static analysis for HTTP client calls that consume request parameters without destination validation.
  • Code review checks for missing allowlists, private-address filtering, redirect validation, and DNS rebinding defenses.
  • Monitoring outbound requests from the KubeSphere server to unexpected internal hosts, metadata services, or unusual ports.
  • Auditing endpoint error responses for leaked credentials, Secret contents, or upstream response data.
  • Enforcing application-security policies that require approved egress destinations and prohibit sensitive data in error messages.
  • Using automated security review tools to identify SSRF-prone request construction and unsafe response handling.

Sources

SourceLink
github.comgithub.com/kubesphere/kubesphere
github.comgithub.com/kubesphere/kubesphere/blob/3ef3a6bc98b790480577e87fbc75bee5b3438862/config/ks-core/templates/globalroles.yaml
github.comgithub.com/kubesphere/kubesphere/blob/3ef3a6bc98b790480577e87fbc75bee5b3438862/pkg/kapis/resources/v1alpha2/handler.go
github.comgithub.com/kubesphere/kubesphere/blob/3ef3a6bc98b790480577e87fbc75bee5b3438862/pkg/models/git/git.go
github.comgithub.com/kubesphere/kubesphere/issues/6653
vulncheck.comvulncheck.com/advisories/kubesphere-through-4.1.3-ssrf-via-git-credential-verification-endpoint

Frequently asked

questions

It may be exploitable through network access to the KubeSphere API, provided the attacker has valid authentication and permission to invoke the affected endpoint.

Authentication is required according to the reported behavior. The relevant account must also be able to reach and use the Git credential verification function.

Treat submitted URLs as untrusted, permit requests only to explicitly approved destinations, block internal and reserved address ranges, validate redirects, and avoid returning sensitive upstream data in errors.

Combine strict SSRF-resistant URL validation with egress network controls, least-privilege Secret access, security-focused code review, and monitoring for unexpected server-side outbound requests.

Find out what's already
exploitable in your codebase.