Restrict insecure unauthenticated server to loopback binds
feat(cli): restrict insecure unauthenticated server to loopback binds (#5354)
Restrict insecure unauthenticated server to loopback bindsc26c6a-feat-restrict-insecure-unauthenticated-server-to-loopback-cve-2026-45695featrestrict insecure unauthenticated server loopback binds
Committed by jkowalski
commit message
feat(cli): restrict insecure unauthenticated server to loopback binds (#5354)
* feat(cli): restrict insecure unauthenticated server to loopback binds
Reject starting the server with --insecure and --without-password when
--address would bind outside loopback (including empty host / all
interfaces). Validate the actual listener after Listen so systemd socket
activation cannot bypass the check.
Add hidden --allow-extremely-dangerous-unauthenticated-server-on-the-network
to opt into the previous behavior for isolated environments.
Extract validation into internal/insecureserverbind with table-driven tests.
Add end-to-end smoke tests for rejection and escape hatch.
Co-authored-by: Cursor <[email protected]>
* Update internal/insecureserverbind/insecureserverbind.go
Co-authored-by: Julio López <[email protected]>
* pr feedback
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Julio López <[email protected]>Editor assessment
This commit patches CVE-2026-45695. The subject is specific and imperative, restricting the insecure unauthenticated server to loopback binds, and the body adds useful mechanics: rejection when the address is outside loopback including empty or all-interface hosts, validation after Listen so systemd socket activation cannot slip past, and a hidden escape-hatch flag for isolated environments. Table-driven and end-to-end tests are mentioned. The type reads as feat because a new flag ships, though the security motivation is the real driver. The body still carries squash artifacts, a bare file-update bullet and a pr feedback line, which muddy an otherwise strong message.