# CVE-2026-82289: Gitingest Prefix-Based Git Host Check Enables Request Forgery and Token Disclosure

The Markdown version of <https://upatch.dev/cve/CVE-2026-82289>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-82289 is rated High 8.3 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects Gitingest (coderamp-labs) and was published on 28 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.4%: the estimated chance it is exploited in the next 30 days, as of 25 Nov 2026. The upatch `cve-2026-82289-ssrf-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-82289 is a Server-Side Request Forgery (CWE-918) and GitHub Personal Access Token (PAT) disclosure vulnerability in `coderamp-labs/gitingest` through 0.3.1.

When a user submits a repository URL to `/api/ingest`, `parse_remote_repo()` calls `_normalise_source()` and `_validate_host()` in `src/gitingest/utils/query_parser_utils.py`. `_validate_host()` checks whether the hostname is in `KNOWN_GIT_HOSTS` or satisfies `_looks_like_git_host()`, which accepts any hostname starting with `git.`, `gitlab.`, or `github.`:

```python
def _looks_like_git_host(host: str) -> bool:
    host = host.lower()
    return host.startswith(("git.", "gitlab.", "github."))
```

In `src/gitingest/utils/git_utils.py`, `is_github_host()` likewise checks only `hostname.startswith("github.")`, and `_resolve_ref_to_sha()` invokes `git -c http.https://<hostname>/.extraheader=Authorization: Basic <base64> ls-remote <url> HEAD`. Git spawns its HTTP transport helper (`git-remote-http` or `git-remote-https`, both with task `comm` `git-remote-http`) to connect to the target host. Because `_validate_host()` performs only a string prefix check without verifying that the host belongs to a trusted public domain or resolves to a public IP address, an attacker can submit a URL with a `git.`, `gitlab.`, or `github.` prefix (such as `http://github.localhost:<port>/owner/repo` or a DNS record under `github.<attacker-domain>` resolving to loopback, link-local metadata, or internal networks) to trigger server-side requests to internal services and leak any supplied GitHub PAT in the `Authorization: Basic` header.

### Official description

Gitingest through 0.3.1 fails to properly validate hostnames in \_validate_host, accepting any host with a git., gitlab., or github. prefix regardless of known-hosts list membership. Attackers can submit URLs with attacker-controlled hostnames to trigger outbound connections to arbitrary hosts and disclose GitHub personal access tokens via HTTP basic credentials.

## What the upatch does

`cve-2026-82289-ssrf-block.bpf.c` attaches to `SEC("lsm/socket_connect")`.

1. If an earlier LSM already denied the connection (`ret != 0`), it returns `ret`.
2. It checks `bpf_get_current_comm()` for `"git-remote-http"` (the 15-byte task `comm` shared by `git-remote-http` and `git-remote-https` when `git ls-remote`, `git clone`, or `git fetch` connects over HTTP or HTTPS). Other processes, including the FastAPI server listening on `127.0.0.1` and local administrative tools, are untouched.
3. It reads the target socket address (`AF_INET` or `AF_INET6`) and checks whether the destination IP is in a loopback, unspecified, link-local, shared address space, or private range (`0.0.0.0/8`, `10.0.0.0/8`, `100.64.0.0/10`, `127.0.0.0/8`, `169.254.0.0/16`, `172.16.0.0/12`, `192.168.0.0/16`, `::/128`, `::1/128`, IPv4-mapped `::ffff:0:0/96` in those ranges, `fc00::/7`, and `fe80::/10`).
4. If the destination is in one of those ranges, it increments the `REFUSED_CONNECT` counter in the `stats` per-CPU array map and returns `-EPERM`. Connections from `git-remote-http` to public Git hosts (`github.com`, `gitlab.com`, `bitbucket.org`, `gitea.com`, `codeberg.org`) succeed normally.

The policy: [`cve-2026-82289-ssrf-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82289), 123 lines of BPF C attached at `lsm/socket_connect`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

## Affected versions

- `gitingest` through 0.3.1 (no upstream fix release at publication time)

## How it was tested

On Gitingest 0.3.1, the loaded upatch refused the outbound loopback connection from git-remote-http triggered by a github.localhost URL at /api/ingest.

- **Tested:** 25 Nov 2026
- **Target:** Gitingest 0.3.1 on Python 3.12, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | POST /api/ingest with https\://github.localhost:\<port>/owner/repo |
| --------------- | ------------------------------------------------------------------ |
| Before loading  | reached (connected to 127.0.0.1:38343)                             |
| Upatch loaded   | blocked (refused by the upatch)                                    |
| After unloading | reached (connected to 127.0.0.1:38215)                             |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82289
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-82289-1.0.0.bee oci://<registry>/<namespace>/cve-2026-82289 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-82289-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [NVD — CVE-2026-82289](https://nvd.nist.gov/vuln/detail/CVE-2026-82289)
- [Gitingest Issue #592 — SSRF via Loose Hostname Validation](https://github.com/coderamp-labs/gitingest/issues/592)
- [VulnCheck Advisory — Gitingest Prefix-Based Git Host Check Enables Request Forgery and Token Disclosure](https://www.vulncheck.com/advisories/gitingest-prefix-based-git-host-check-enables-request-forgery-and-token-disclosure)
- [Gitingest `src/gitingest/utils/query_parser_utils.py`](https://github.com/coderamp-labs/gitingest/blob/4e259a02fe72115bee538271622f1234a81c8e1a/src/gitingest/utils/query_parser_utils.py)
- [Gitingest `src/gitingest/utils/git_utils.py`](https://github.com/coderamp-labs/gitingest/blob/4e259a02fe72115bee538271622f1234a81c8e1a/src/gitingest/utils/git_utils.py)

### Links

- [CVE-2026-82289 on upatch.dev](https://upatch.dev/cve/CVE-2026-82289) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-82289)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-82289)
- [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
- Upatch source: [upatches/cve-2026-82289](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82289)

### More references from NVD (5)

- [github.com](https://github.com/coderamp-labs/gitingest)
- [github.com](https://github.com/coderamp-labs/gitingest/blob/4e259a02fe72115bee538271622f1234a81c8e1a/src/gitingest/utils/git_utils.py)
- [github.com](https://github.com/coderamp-labs/gitingest/blob/4e259a02fe72115bee538271622f1234a81c8e1a/src/gitingest/utils/query_parser_utils.py)
- [github.com](https://github.com/coderamp-labs/gitingest/issues/592)
- [vulncheck.com](https://www.vulncheck.com/advisories/gitingest-prefix-based-git-host-check-enables-request-forgery-and-token-disclosure)
