What’s Vulnerable › Vulnerabilities

CVE-2026-42503: Accidental binding to INADDR_ANY might lead to RCE in golang.org/x/tools/gopls

Description

gopls by default communicates via pipe. However, -port and -listen flags are supported as means of debugging. If -listen is given a value without an explicit host (e.g. :8080), or -port is used, gopls will listen on 0.0.0.0.  As a result, users might inadvertently cause gopls to bind 0.0.0.0. This can allow a malicious party on the same network to execute code arbitrarily via gopls.

Affected products

How to fix

Upgrade to a fixed version: golang.org/x/tools/gopls 0.22.0. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-42503 or the next vulnerability affects your stack