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.
How it's found
Multiple Binds to the Same Port is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
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.
Consequences
- Read Application Data: Packets from a variety of network services may be stolen or the services spoofed.
Mitigations
- Policy: Restrict server socket address to known local addresses.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
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.
How do you find Multiple Binds to the Same Port?
Multiple Binds to the Same Port is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
What is the impact of CWE-605?
Read Application Data: Packets from a variety of network services may be stolen or the services spoofed.
Does TurboPentest test for Multiple Binds to the Same Port?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest