Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105218 Overview
CVE-2026-105218 affects the GoPay payment SDK for Go, a library used to integrate with payment provider APIs including PayPal, Alipay, and WeChat Pay. Versions before 1.5.119 disable Transport Layer Security (TLS) certificate verification inside the defaultClient() function in pkg/xhttp/client.go. The flaw allows network-positioned attackers to impersonate payment provider endpoints by presenting any certificate. Attackers can read merchant credentials, signatures, and transaction data, then modify payment, refund, and order query responses in transit. The weakness is classified as [CWE-295: Improper Certificate Validation].
Critical Impact
An attacker with a man-in-the-middle (MITM) position can intercept and tamper with payment traffic, exposing merchant secrets and manipulating financial transaction responses.
Affected Products
- GoPay SDK (github.com/go-pay/gopay) versions prior to 1.5.119
- Go applications importing the vulnerable pkg/xhttp client
- Merchant integrations using GoPay for PayPal, Alipay, WeChat Pay, or similar payment APIs
Discovery Timeline
- 2026-10-04 - CVE-2026-105218 published to the National Vulnerability Database
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105218
Vulnerability Analysis
The GoPay SDK constructs its HTTP client in defaultClient() within pkg/xhttp/client.go. The function configures a tls.Config with certificate validation disabled, meaning the client accepts any certificate chain presented by a remote server. Every outbound request made through the shared GoPay client inherits this insecure configuration.
Because GoPay is used to communicate with payment processors, every request carries sensitive data. Request bodies contain merchant identifiers, API credentials, request signatures, and order details. Response bodies carry payment status, refund confirmations, and settlement information. Disabling certificate verification removes the only cryptographic guarantee that these messages reach the intended payment provider.
An attacker who can intercept TLS traffic between the merchant application and a payment API can decrypt, inspect, and rewrite the exchange. The attack does not require exploiting the server, only control of a network path such as a rogue proxy, DNS redirection, or compromised upstream router.
Root Cause
The root cause is an insecure default configuration in pkg/xhttp/client.go. The shared HTTP transport sets InsecureSkipVerify behavior, bypassing hostname and certificate chain validation. The library offers no opt-in mechanism to tighten this behavior for downstream callers, so every merchant integration inherits the flaw by default.
Attack Vector
Exploitation requires a network-adjacent position between the merchant application and the payment provider. Techniques include ARP spoofing on shared networks, BGP hijacking, malicious transparent proxies, or compromised corporate egress gateways. Once positioned, the attacker presents a self-signed or attacker-controlled certificate, which GoPay accepts without warning. The attacker then relays or modifies traffic to the real provider.
// Patch metadata from the fix commit f6df04f (v1.5.119)
// pkg/common/constant.go
OK = "OK"
DebugOff = 0
DebugOn = 1
-Version = "v1.5.118"
+Version = "v1.5.119"
Source: GoPay commit f6df04f
Detection Methods for CVE-2026-105218
Indicators of Compromise
- Unexpected certificate authorities observed in TLS handshakes to payment provider hostnames such as api.paypal.com, openapi.alipay.com, or api.mch.weixin.qq.com.
- Payment callbacks or order query responses that do not reconcile with records at the payment provider portal.
- Outbound payment API traffic traversing unexpected proxies or egress IPs not on the approved allowlist.
Detection Strategies
- Perform software composition analysis on Go modules and flag any github.com/go-pay/gopay version below 1.5.119 in go.sum files or build artifacts.
- Deploy TLS inspection or passive certificate monitoring on egress paths to validate that payment API endpoints present certificates chained to the expected roots.
- Reconcile merchant-side transaction logs with payment provider dashboards to detect discrepancies that could indicate response tampering.
Monitoring Recommendations
- Alert on DNS responses that map payment provider hostnames to non-provider IP ranges.
- Monitor application logs for TLS handshake anomalies, retries, or unusual latency to payment endpoints.
- Capture and retain full HTTP request and response metadata for payment transactions to support post-incident forensics.
How to Mitigate CVE-2026-105218
Immediate Actions Required
- Upgrade the GoPay dependency to version 1.5.119 or later and rebuild all affected services.
- Rotate any merchant API credentials, signing keys, and secrets that were used by vulnerable builds, since those secrets may have been exposed to interception.
- Audit outbound network paths from application hosts to payment providers and remove unapproved proxies or TLS-intercepting middleboxes.
Patch Information
The fix is included in GoPay v1.5.119, delivered in commit f6df04f. Update using go get github.com/go-pay/gopay@v1.5.119 and verify the resolved version in go.sum. Review the VulnCheck advisory and GoPay issue #540 for additional context.
Workarounds
- If immediate upgrade is not possible, wrap or replace the GoPay HTTP client with a custom http.Client that uses a hardened tls.Config with InsecureSkipVerify: false and pinned root certificates.
- Restrict outbound traffic from merchant servers to a strict allowlist of payment provider IP ranges to reduce the attacker's ability to insert a MITM position.
- Terminate payment API traffic through a vetted internal gateway that enforces certificate validation before requests leave the environment.
# Pin the fixed GoPay release in your Go module
go get github.com/go-pay/gopay@v1.5.119
go mod tidy
# Verify no vulnerable version remains in the dependency graph
go list -m -versions github.com/go-pay/gopay
grep gopay go.sum
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

