Xray-core: Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/xtls/xray-core 1.260327.1-0.20260710210335-64fada32b5b9), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- >= 1.260113.0, < 1.260327.1-0.20260710210335-64fada32b5b9
- Fixed in
- 1.260327.1-0.20260710210335-64fada32b5b9
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GO-2026-6651 lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9 (fixed)
VerifiedObserved Structured OSV record; not marked as GitHub-reviewed.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-5wf9-h793-w73c lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-5wf9-h793-w73c lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 7.6 · 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 · score source
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
Summary Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks in some cases. Details https://github.com/XTLS/Xray-core/blob/45cf2898ab12e97a55dd8f1f3d78d903340bdc9e/transport/internet/tls/config.go#L333-L347 If r.Config.ServerName is empty, DNSName will be empty and certs[0].Verify(opts) will not verify against dNSName or iPAddress. If a user pins a well-known and non-self-signed CA, an attacker can issue a leaf certificate through the Root CA (using the attacker's own domain name or IP address) and hijack the connections. In Go crypto/tls, either ServerName or InsecureSkipVerify must be specified in the tls.Config. If the user specifies pinnedPeerCertSha256, InsecureSkipVerify will always be true so ServerName can be empty. In most cases, if the user does not specify the serverName, Xray-core will use the server address as the r.Config.ServerName. Thanks to GetTLSConfig(tls.WithDestination(dest)), ServerName will usually not be empty. However,…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 4 · amended ·
Amended from ghsa record GHSA-5wf9-h793-w73c
- Revision 3 · amended ·
Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.
- Revision 2 · amended ·
Amended from osv record GO-2026-6651
- Revision 1 · created ·
Published from osv record GHSA-5wf9-h793-w73c
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-5wf9-h793-w73c Advisory: Xray-core: Pinning a CA certificate via pinnedPeerCertSha256 can lead to the success of MITM attacks IDs: GHSA-5wf9-h793-w73c Record: https://patchnext.com/advisories/ghsa-5wf9-h793-w73c (revision 4, source checked 26 Oct 2026, 15:29 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.6) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: github.com/xtls/xray-core 1.260327.1-0.20260710210335-64fada32b5b9. A vendor fix does not mean a deployment is fixed. ## Affected components - Go github.com/xtls/xray-core: affected >= 1.260113.0, < 1.260327.1-0.20260710210335-64fada32b5b9; fixed in 1.260327.1-0.20260710210335-64fada32b5b9 ## Suggested inspection (read-only) - Go github.com/xtls/xray-core: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on github.com/xtls/xray-core. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GO-2026-6651 (OSV record GO-2026-6651 lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9 (fixed)) - Verified: https://osv.dev/vulnerability/GHSA-5wf9-h793-w73c (OSV record GHSA-5wf9-h793-w73c lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9 (fixed)) - Verified: https://github.com/advisories/GHSA-5wf9-h793-w73c (GitHub-reviewed advisory GHSA-5wf9-h793-w73c lists affected ranges: Go github.com/xtls/xray-core >=1.260113.0 <1.260327.1-0.20260710210335-64fada32b5b9) Commands are suggestions: review each one before running it.
Loading voting…