Umbra Wiki weakness weakness/CWE-605
Back to wiki

CWE-605 — Multiple Binds to the Same Port

provenance: imported · CWE: CWE-605

CWE-605: Multiple Binds to the Same Port

MITRE CWE weakness

Kind Weakness
Abstraction Variant
Status Draft
Likelihood of exploit —

Description

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

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.

Common consequences

  • Confidentiality, Integrity: Read Application Data

Mitigations

Policy — Restrict server socket address to known local addresses.

References

  • CWE page: https://cwe.mitre.org/data/definitions/605.html
  • CWE list: https://cwe.mitre.org/data/index.html

See all 1,245 pages under Weakness classes (CWE) →

Related pages