CVE-2026-82289
Gitingest Prefix-Based Git Host Check Enables Request Forgery and Token Disclosure
Refuses loopback and private network connections from Gitingest git remote helpers to mitigate CVE-2026-82289.
High 8.3Vetted
EPSS 0.4%: the estimated chance this CVE is exploited in the next 30 days, as of 25 Nov 2026.
At a glance
CVE-2026-82289 is a high (CVSS 8.3) vulnerability in Gitingest, published 28 August 2026. A vetted upatch, cve-2026-82289-ssrf-block, blocks it on running Linux machines with shirudo until Gitingest is upgraded.
- Severity
- High 8.3 CVSS 4.0
- Chance of exploitation
- 0.4% in the next 30 days (EPSS, 25 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-918
- Affected software
- Gitingest (coderamp-labs)
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
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.:
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.
Affected versions
gitingestthrough 0.3.1 (no upstream fix release at publication time)
Sources
More references from NVD (5)
Mitigation
cve-2026-82289-ssrf-block.bpf.c attaches to SEC("lsm/socket_connect").
- If an earlier LSM already denied the connection (
ret != 0), it returnsret. - It checks
bpf_get_current_comm()for"git-remote-http"(the 15-byte taskcommshared bygit-remote-httpandgit-remote-httpswhengit ls-remote,git clone, orgit fetchconnects over HTTP or HTTPS). Other processes, including the FastAPI server listening on127.0.0.1and local administrative tools, are untouched. - It reads the target socket address (
AF_INETorAF_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/96in those ranges,fc00::/7, andfe80::/10). - If the destination is in one of those ranges, it increments the
REFUSED_CONNECTcounter in thestatsper-CPU array map and returns-EPERM. Connections fromgit-remote-httpto public Git hosts (github.com,gitlab.com,bitbucket.org,gitea.com,codeberg.org) succeed normally.
The policy
123 lines of BPF C, attached at lsm/socket_connect.
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_endian.h>
#define AF_INET 2
#define AF_INET6 10
#define EPERM 1
char _license[] SEC("license") = "Dual BSD/GPL";
enum stat_idx {
REFUSED_CONNECT = 0,
STAT_MAX,
};
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, STAT_MAX);
__type(key, __u32);
__type(value, __u64);
} stats SEC(".maps");
static __always_inline void count(enum stat_idx idx)
{
__u32 key = idx;
__u64 *val = bpf_map_lookup_elem(&stats, &key);
if (val)
(*val)++;
}
static __always_inline bool is_git_remote_http(void)
{
char comm[TASK_COMM_LEN] = {};
if (bpf_get_current_comm(&comm, sizeof(comm)))
return false;
return comm[0] == 'g' && comm[1] == 'i' && comm[2] == 't' &&
comm[3] == '-' && comm[4] == 'r' && comm[5] == 'e' &&
comm[6] == 'm' && comm[7] == 'o' && comm[8] == 't' &&
comm[9] == 'e' && comm[10] == '-' && comm[11] == 'h' &&
comm[12] == 't' && comm[13] == 't' && comm[14] == 'p';
}
static __always_inline bool is_private_v4(__u32 addr_be)
{
__u32 addr = bpf_ntohl(addr_be);
if ((addr & 0xff000000u) == 0x00000000u)
return true;
if ((addr & 0xff000000u) == 0x7f000000u)
return true;
if ((addr & 0xff000000u) == 0x0a000000u)
return true;
if ((addr & 0xfff00000u) == 0xac100000u)
return true;
if ((addr & 0xffff0000u) == 0xc0a80000u)
return true;
if ((addr & 0xffff0000u) == 0xa9fe0000u)
return true;
if ((addr & 0xffc00000u) == 0x64400000u)
return true;
return false;
}
static __always_inline bool is_private_v6(const struct in6_addr *in6)
{
__u32 w0 = bpf_ntohl(in6->in6_u.u6_addr32[0]);
__u32 w1 = bpf_ntohl(in6->in6_u.u6_addr32[1]);
__u32 w2 = bpf_ntohl(in6->in6_u.u6_addr32[2]);
__u32 w3 = bpf_ntohl(in6->in6_u.u6_addr32[3]);
if (w0 == 0 && w1 == 0 && w2 == 0 && (w3 == 0 || w3 == 1))
return true;
if (w0 == 0 && w1 == 0 && w2 == 0x0000ffffu)
return is_private_v4(in6->in6_u.u6_addr32[3]);
if ((w0 & 0xfe000000u) == 0xfc000000u)
return true;
if ((w0 & 0xffc00000u) == 0xfe800000u)
return true;
return false;
}
SEC("lsm/socket_connect")
int BPF_PROG(cve_2026_82289_ssrf_block, struct socket *sock,
struct sockaddr *address, int addrlen, int ret)
{
struct sockaddr_in6 sin6 = {};
struct sockaddr_in sin = {};
__u16 family = 0;
if (ret != 0)
return ret;
if (!address || addrlen < (int)sizeof(family))
return 0;
if (!is_git_remote_http())
return 0;
if (bpf_probe_read_kernel(&family, sizeof(family), &address->sa_family))
return 0;
if (family == AF_INET) {
if (addrlen < (int)sizeof(sin) ||
bpf_probe_read_kernel(&sin, sizeof(sin), address))
return 0;
if (is_private_v4(sin.sin_addr.s_addr)) {
count(REFUSED_CONNECT);
return -EPERM;
}
} else if (family == AF_INET6) {
if (addrlen < (int)sizeof(sin6) ||
bpf_probe_read_kernel(&sin6, sizeof(sin6), address))
return 0;
if (is_private_v6(&sin6.sin6_addr)) {
count(REFUSED_CONNECT);
return -EPERM;
}
}
return 0;
}
The package: name, license, the program and the CVE it fixes.
# SPDX-License-Identifier: BSD-2-Clause
[package]
name = "cve-2026-82289"
description = "Refuses loopback and private network connections from Gitingest git remote helpers to mitigate CVE-2026-82289"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-82289-ssrf-block.bpf.c"
[upatches.tree]
id = "cve-2026-82289-ssrf-block"
fixes = ["CVE-2026-82289"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 28 Aug 2026CVECVE published
- 25 Nov 2026Pull requestPull request #107 openedAdd CVE-2026-82289: Refuses loopback and private network connections from Gitingest git remoteromanlab
- 25 Nov 2026CICheck entriespassed
- 25 Nov 2026CIingestpassed
- 25 Nov 2026CICompile with clang 23passed
- 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
- 25 Nov 2026MergeMerged #107romanlab
No human review is recorded on GitHub for this upatch yet.
Evidence
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
| 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) |
tools-test.log Output of tools/test --setup for cve-2026-82289 on a shirudo test VM.
tools/test --setup, 2026-11-25T16:27:08Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-82289 setup done GITINGEST_URL=http://127.0.0.1:8000 before reached gitingest accepted github.localhost and git-remote-http connected to 127.0.0.1:38343 loaded blocked git-remote-http connection to 127.0.0.1 was refused by the upatch after reached gitingest accepted github.localhost and git-remote-http connected to 127.0.0.1:38215 PASS: reached before, blocked while loaded, reached again after
Use it
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.
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82289shirudo 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>