CVE-2026-6874
Received Received - Intake

Host Header Manipulation in ericc-ch copilot-api Enables Remote Attack

Vulnerability report for CVE-2026-6874, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-04-23

Last updated on: 2026-04-29

Assigner: VulDB

Description

A vulnerability was determined in ericc-ch copilot-api up to 0.7.0. This impacts an unknown function of the file /token of the component Header Handler. Executing a manipulation of the argument Host can lead to reliance on reverse dns resolution. The attack may be performed from remote. The exploit has been publicly disclosed and may be utilized. The vendor was contacted early about this disclosure but did not respond in any way.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-04-23
Last Modified
2026-04-29
Generated
2026-07-26
AI Q&A
2026-04-23
EPSS Evaluated
2026-07-25
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ericc-ch copilot-api to 0.7.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-350 The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-6874 is a DNS rebinding vulnerability in the ericc-ch copilot-api HTTP server (version 0.7.0 and earlier). The server does not validate the Host header of incoming HTTP requests and uses a permissive CORS policy that allows any origin to access its responses. Additionally, it binds to all network interfaces without hostname restrictions.

An attacker can exploit this by registering a domain with a DNS record that alternates between the attacker's server IP and localhost (127.0.0.1). When a victim visits the attacker-controlled webpage, the victim's browser is tricked into sending requests to the copilot-api server running locally, bypassing same-origin policy protections.

Because the server accepts any Host header and allows cross-origin requests, the attacker can retrieve sensitive data such as the victim's Copilot Bearer token in plaintext. This token can then be exfiltrated to the attacker’s server, enabling unauthorized access to the victim’s GitHub Copilot API privileges.

Detection Guidance

This vulnerability can be detected by testing if the ericc-ch copilot-api server accepts arbitrary Host headers without validation and if it exposes sensitive tokens via the /token endpoint.

A practical detection method is to use curl to send HTTP requests with manipulated Host headers to the server and observe if the token is returned regardless of the Host value.

  • Use curl to test Host header acceptance: curl -H "Host: attacker.com" http://localhost:4141/token
  • Check if the server responds with sensitive token data despite the Host header being set to an arbitrary domain.
Impact Analysis

This vulnerability can lead to the full theft of your Copilot Bearer token, which grants access to the GitHub Copilot API with your privileges.

An attacker can remotely exploit this by tricking you into visiting a malicious webpage, without needing local network access.

With the stolen token, the attacker can exhaust your Copilot premium request quota, potentially causing financial or service disruption impacts.

Additionally, the vulnerability allows bypassing browser security policies, exposing sensitive API responses to unauthorized parties.

Compliance Impact

This vulnerability allows a remote attacker to steal sensitive authentication tokens (Copilot Bearer tokens) from victims by bypassing browser security policies through DNS rebinding and permissive CORS settings.

The theft of such sensitive tokens can lead to unauthorized access to user data and services, which may result in violations of data protection regulations such as GDPR or HIPAA, especially if personal or protected health information is accessed or exposed.

Because the vulnerability enables exfiltration of sensitive authentication credentials without user consent or awareness, affected organizations could face compliance risks related to confidentiality, integrity, and unauthorized access controls mandated by these standards.

Mitigation Strategies

Immediate mitigation steps include validating the Host header against a whitelist of allowed hostnames to prevent arbitrary Host header acceptance.

Additionally, avoid using wildcard CORS policies; restrict Access-Control-Allow-Origin to trusted origins only.

Bind the server explicitly to localhost or a specific hostname rather than all network interfaces to reduce exposure.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-6874. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart