/

CVE-2026-82247

Severity:

HIGH RISK

(7.5)

Credential Exposure (CWE-522) in gitoxide URL Parser

CVE-2026-82247

Deferred

Vulnerability type

Category:

Improper URL Parsing

CWE:

CWE-522

Impact:

Exposure of Authentication Credentials

Severity:

HIGH RISK

(7.5)

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

A URL parsing flaw in gitoxide's gix-url crate can cause gix-transport to misidentify the destination of an HTTP redirect. When an attacker controls a redirect response, the flaw may cause HTTP Basic Authorization credentials to be sent to an unintended host.

Affected context

The issue occurs in gitoxide deployments that use gix-transport for HTTP operations and follow attacker-influenced redirects. It is relevant when HTTP Basic Authorization credentials are available for reuse and the redirect target is parsed by the affected hand-rolled URL parser. The risk depends on whether an attacker can provide or influence an HTTP redirect response during a repository or remote interaction.

Exploit preconditions

  • Attack surface: HTTP redirect handling in git transport operations
  • Required access: Ability to control or influence a redirect response
  • Credential condition: The client must have HTTP Basic Authorization credentials available for the request
  • Trigger point: Processing a crafted Location header during redirect evaluation
  • Why exploitation is possible: The parser does not treat ? or # as terminating the authority component, causing the identity-reuse check to compare the wrong host and fail open

Why this happens

The underlying bug is nonconforming authority parsing in a hand-rolled URL parser. Because query and fragment delimiters are not handled according to RFC 3986, a crafted redirect can make the parser derive an incorrect host identity. The transport layer then relies on that incorrect identity when deciding whether credentials may be reused, mapping to CWE-522 because authentication credentials can be disclosed to an unintended recipient.

Potential impact

  • An attacker could receive HTTP Basic Authorization credentials
  • Credentials could be reused against protected repositories or services
  • Compromised credentials may enable unauthorized repository access
  • Private source code or other protected resources could be exposed
  • Downstream systems could be affected if the exposed credentials have broader privileges

General mitigation guidance

Mitigation generally focuses on using standards-compliant URL parsing and

making credential forwarding fail closed.

Common defensive patterns include:

  • Use a well-maintained, RFC-conforming URL parser rather than hand-rolled authority parsing
  • Revalidate the effective scheme, host, port, and user-information boundaries after redirects
  • Forward credentials only when the redirect destination is explicitly trusted and equivalent under a clearly defined policy
  • Avoid sending reusable credentials across host, scheme, or security-boundary changes
  • Prefer short-lived, narrowly scoped credentials and minimize their privileges
  • Disable automatic redirect credential reuse where it is not required
  • Treat redirect responses and remote URL metadata as untrusted input

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying hand-written URL authority parsing
  • Code review checks for credential reuse decisions based on partially parsed URLs
  • Tests covering ?, #, user-information, alternate ports, encoded delimiters, and cross-host redirects
  • Policy checks requiring standards-compliant URL libraries for security-sensitive destination validation
  • Integration tests verifying that credentials are never forwarded to an untrusted redirect target
  • Automated dependency and security review tools that flag vulnerable parser and transport components

Sources

SourceLink
github.comgithub.com/GitoxideLabs/gitoxide/security/advisories/GHSA-jrcm-326h-gpp8
vulncheck.comvulncheck.com/advisories/gitoxide-before-0.37.1-http-basic-credential-leak-via-url-parsing

Frequently asked

questions

It can be exploitable through a network interaction when an attacker can control

or influence an HTTP redirect response that a gitoxide client follows.

No. The attacker needs to control the redirect path and the victim client must

have HTTP Basic Authorization credentials available for reuse.

Use standards-compliant URL parsing and fail closed when determining whether

credentials may be reused across a redirect.

Treat redirect destinations as untrusted, enforce explicit origin and privilege

policies, test delimiter and authority edge cases, and use narrowly scoped,

short-lived credentials.

Find out what's already
exploitable in your codebase.