Skip to main content
VulnerabilityPublished

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

Affects github.com/xtls/xray-coreSource GCVE Database

0

CVSS 7.6 High : upgrade to 1.260327.1-0.20260710210335-64fada32b5b9 soon.

Data as of 3 Oct 2026, 17:41 UTC

CVSS 4.0 base score
7.6High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.260327.1-0.20260710210335-64fada32b5b9
CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

What to do

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

Affected software

ProductAffectedFixed in
Gogithub.com/xtls/xray-coreAffected
  • >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9
Fixed in
  • 1.260327.1-0.20260710210335-64fada32b5b9

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available for this vulnerability. Users should upgrade to a fixed version of Xray-core to ensure ServerName is properly set in all TLS configurations, especially when using pinnedPeerCertSha256. Until patched, users should explicitly specify ServerName when configuring TLS to avoid empty ServerName values. Review usage of pinnedPeerCertSha256 and avoid relying solely on CA pinning without hostname verification.

Description

Xray-core has a vulnerability where pinning a CA certificate using pinnedPeerCertSha256 can enable man-in-the-middle (MITM) attacks if the ServerName configuration is empty. This occurs because the TLS verification does not check the hostname against the certificate when ServerName is missing and InsecureSkipVerify is true. In some code paths, ServerName is not set when using IP addresses or certain dialers, allowing an attacker to issue a leaf certificate from the pinned CA and hijack connections.

References

Community reviews

Loading reviews…