---
title: "CWE-605: Multiple Binds to the Same Port"
url: https://radicalnotion.ai/cwe/cwe-605
type: cwe
description: "When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-605: Multiple Binds to the Same Port

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 3
- **Of those, in CISA KEV:** 0
- **New in 2026:** 2
- **CWE catalog version:** 4.21

## Description

When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed.

## Background

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.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |
| Operation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Application Data | An attacker could access the TCP connection or UDP packets for a different service. Packets from a variety of network services may be stolen or the services spoofed. |

## Potential mitigations

### Policy

Restrict server socket address to known local addresses.

## Detection methods

### 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.)

## Demonstrative examples

### Example 1

This code binds a server socket to port 21, allowing the server to listen for traffic on that port.

Bad code:

```c
void bind_socket(void) {

    int server_sockfd;
    int server_len;
    struct sockaddr_in server_address;

    /*unlink the socket if already bound to avoid an error when bind() is called*/

    unlink("server_socket");
    server_sockfd = socket(AF_INET, SOCK_STREAM, 0);

    server_address.sin_family = AF_INET;
    server_address.sin_port = 21;
    server_address.sin_addr.s_addr = htonl(INADDR_ANY);
    server_len = sizeof(struct sockaddr_in);

    bind(server_sockfd, (struct sockaddr *) &s1, server_len);
}
```

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.

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-25086 | Automated Logic WebCTRL Premium Server Multiple Binds to the Same Port | high | 7.7 | - | No | 2026-03-20 |
| CVE-2024-30218 | Denial of service (DOS) vulnerability in SAP NetWeaver AS ABAP and ABAP Platform | medium | 6.5 | - | No | 2024-04-09 |
| CVE-2025-15320 | Tanium addressed a denial of service vulnerability in Tanium Client. | low | 3.3 | - | No | 2026-02-06 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-666](https://radicalnotion.ai/cwe/cwe-666) | Operation on Resource in Wrong Phase of Lifetime |
| Parent | [CWE-675](https://radicalnotion.ai/cwe/cwe-675) | Multiple Operations on Resource in Single-Operation Context |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| Software Fault Patterns | Multiple binds to the same port | SFP32 | - |

## Frequently asked questions

### 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 and 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.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/605.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-605). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
