CVE-2026-42503 Accidental binding to INADDR_ANY might lead to RCE in golang.org/x/tools/gopls
Developers using gopls with specific debug flags may inadvertently expose the server to the network, allowing remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-42503?
CVE-2026-42503 is a high-severity vulnerability in golang.org/x/tools/gopls, published on 6 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-1327
Which versions are affected by CVE-2026-42503?
It affects 1 product.
Products include Golang Gopls.
How do I fix CVE-2026-42503?
Change a configuration setting.
Is CVE-2026-42503 being exploited?
There is no known exploitation of CVE-2026-42503 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2026-42503, GHSA-9344-f92h-vr44, UBUNTU-CVE-2026-42503.