---
id: "GHSA-5wf9-h793-w73c"
kind: "vulnerability"
aliases: ["GHSA-5wf9-h793-w73c", "GO-2026-6651"]
title: "Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks in github.com/xtls/xray-core"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/xtls/xray-core", "fixed": ["1.260327.1-0.20260710210335-64fada32b5b9"], "affected": ">= 1.260113.0, < 1.260327.1-0.20260710210335-64fada32b5b9", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["go", "package", "self-hosted", "xray-core"]
not_affected_if: ["default-config"]
published_at: "2026-10-20T00:20:45+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T20:15:22+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6651", "first_seen_at": "2026-10-23T19:13:08+00:00"}]
---

# Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks in github.com/xtls/xray-core

The pinnedPeerCertSha256 setting in xray-core can be bypassed when a CA certificate is pinned, so a man-in-the-middle attacker can intercept TLS connections. The sources do not say what the attacker can read or change beyond that.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/xtls/xray-core affected >= 1.260113.0, < 1.260327.1-0.20260710210335-64fada32b5b9 fixed 1.260327.1-0.20260710210335-64fada32b5b9

## How to check

Check go.mod for github.com/xtls/xray-core and look for pinnedPeerCertSha256 in your Xray config files.

## Fix

Upgrade github.com/xtls/xray-core to 1.260327.1-0.20260710210335-64fada32b5b9 or later.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6651

## From the sources

Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks in github.com/xtls/xray-core

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
