CWE-605: Multiple Binds to the Same Port
When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed.
Last updated
Overview
On most systems, a combination of setting the SO_REUSEADDR socket option, and a call to bind() allows any process to bind to a port to which a previous process has bound with INADDR_ANY. This allows a user to bind to the specific address of a server bound to INADDR_ANY on an unprivileged port, and steal its UDP packets/TCP connection.
Real-world CVEs
3 recorded CVEs are caused by CWE-605 (Multiple Binds to the Same Port). The highest-severity and most recent are shown first. 2 new CWE-605 CVEs have been recorded so far in 2026.
Common consequences
What can happen when CWE-605 is exploited.
Read Application Data
Affects: Confidentiality, Integrity
Packets from a variety of network services may be stolen or the services spoofed.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-605, grouped by where in the lifecycle they apply.
Restrict server socket address to known local addresses.
How to detect it
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
This code binds a server socket to port 21, allowing the server to listen for traffic on that port.
Vulnerable example
void bind_socket(void) {This code may result in two servers binding a socket to same port, thus receiving each other's traffic. This could be used by an attacker to steal packets meant for another process, such as a secure FTP server.
Terminology & mappings
Mapped taxonomies
- Software Fault Patterns: Multiple binds to the same port (SFP32)
Frequently asked questions
Common questions about CWE-605.
- What is CWE-605?
- When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed.
- What CVEs are caused by CWE-605?
- 3 recorded CVEs are attributed to CWE-605, including CVE-2026-25086, CVE-2024-30218, CVE-2025-15320.
- How do you prevent CWE-605?
- Restrict server socket address to known local addresses.
- How is CWE-605 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-605?
- Exploiting CWE-605 can lead to: Read Application Data.
- Is CWE-605 actively exploited?
- 3 recorded CVEs are caused by CWE-605; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-605) (opens in a new tab)
- CWE-605 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-605
Get alerted the moment a new CWE-605 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.