{"id":"CVE-2026-46430","aliases":["CVE-2026-46430","GHSA-gj84-924c-48fx","GO-2026-5401"],"related":[],"kind":"vulnerability","state":"published","title":"Algernon: Auto-refresh SSE event server binds to all interfaces by default on Linux/macOS","summary":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server bound to 0.0.0.0:5553 on Linux/macOS by default because the platform-dependent host default in engine/flags.go:39-46 set host = \"\" for non-Windows, and utils.JoinHostPort(\"\", \":5553\") resolves to \":5553\". This vulnerability is fixed in 1.17.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server bound to 0.0.0.0:5553 on Linux/macOS by default because the platform-dependent host default in engine/flags.go:39-46 set host = \"\" for non-Windows, and utils.JoinHostPort(\"\", \":5553\") resolves to \":5553\". This vulnerability is fixed in 1.17.7.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe SSE event server bound to `0.0.0.0:5553` on Linux/macOS by default because the platform-dependent host default in `engine/flags.go:39-46` set `host = \"\"` for non-Windows, and `utils.JoinHostPort(\"\", \":5553\")` resolves to `\":5553\"` — a Go `http.Server.Addr` of `\":5553\"` listens on every interface. On Windows the same code chose `\"localhost\"`, binding loopback only.\n\nThe result was a platform split where the OS Algernon's dev workflow is most often used on (Linux/macOS) got the network-exposed default, and only Windows users got the loopback-safe one. A LAN peer with no developer interaction could connect to `<dev-laptop-ip>:5553` and read the file-change stream.\n\nThis advisory covers the bind-address default in isolation. The fix is independent of authentication (#2a) and CORS (#2b) — switching the default to loopback can be done without touching either.\n\n### Details\n\n#### Root cause — platform-dependent `host` default in `handleFlags`\n\n```go\n// engine/flags.go:39-46  (1.17.6)\nhost := \"\"\nif runtime.GOOS == \"windows\" {\n    host = \"localhost\"\n    // Default Bolt database file\n    ac.defaultBoltFilename = filepath.Join(serverTempDir, \"algernon.db\")\n    // Default log file\n    ac.defaultLogFile = filepath.Join(serverTempDir, \"algernon.log\")\n}\n```\n\n```go\n// engine/config.go:388-391  (1.17.6, finalConfiguration)\nif ac.eventAddr == \"\" {\n    ac.eventAddr = utils.JoinHostPort(host, ac.defaultEventColonPort)\n}\n```\n\nResult tabulated:\n\n| Platform | `host` | `eventAddr` after `JoinHostPort` | Effective bind |\n|---|---|---|---|\n| Linux | `\"\"` | `\":5553\"` | `0.0.0.0:5553` (all interfaces) |\n| macOS | `\"\"` | `\":5553\"` | `0.0.0.0:5553` (all interfaces) |\n| Windows | `\"localhost\"` | `\"localhost:5553\"` | `127.0.0.1:5553` (loopback) |\n\nThe same `host` value also governs the main web server bind, so the platform split affects both ports. The web-server bind on Linux/macOS is a separate (defensible) design decision — a server intended to be reachable; the SSE port is *not* such a service and inherited the same default by accident.\n\n#### Why this is an independent finding\n\nThe fix is a single line: change the default `host` value, or change the `eventAddr` default specifically, to `\"localhost\"` regardless of platform. No change to authentication or CORS is required to close the network-reach half of the original bundled advisory. A LAN peer can no longer connect — the listener is unreachable from another host — even if the SSE handler still has no authentication and still returns `Allow-Origin: *`.\n\n### PoC (against 1.17.6 on Linux/macOS)\n\n```bash\n# Operator's laptop on a hotel/cafe/office WiFi:\nalgernon -a /path/to/project\n# => SSE listener bound to 0.0.0.0:5553\n\n# Any peer on the same subnet:\n$ curl -sN http://<dev-laptop-ip>:5553/sse\nid: 0\ndata: /path/to/project/secret-notes.md\n\nid: 1\ndata: /path/to/project/.env.local\n```\n\nNo interaction from the developer is required. The peer needs network reach and nothing else.\n\n### Impact\n\n- **Confidentiality:** medium. LAN-bounded continuous information disclosure of filenames and edit timing.\n- **Integrity:** none.\n- **Availability:** none directly.\n\nThe CVSS vector uses `AV:A` (adjacent network) to model the LAN-only reach. The vector for a misconfigured deployment behind a NAT-less or routed network would shift to `AV:N` and rise to 5.3.\n\n### Suggestions to fix\n\n**Primary fix — pick `localhost` as the SSE default on every platform.**\n\n```go\n// engine/flags.go -- platform-independent default for the event listener\n// (keep the existing platform split for the WEB server if desired, but\n// not for the event server)\nhost := \"localhost\"\n```\n\nOr, more surgically:\n\n```go\n// engine/config.go -- finalConfiguration\nif ac.eventAddr == \"\" {\n    ac.eventAddr = utils.JoinHostPort(\"localhost\", ac.defaultEventColonPort)\n}\n```\n\nAn operator who genuinely wants LAN-reachable SSE can pass `--eventserver 0.0.0.0:5553` explicitly and accept the consequences.\n\n**Stronger fix — eliminate the second listener entirely.** Mount the SSE handler on the main mux at `/sse`. The bind address is then whatever the main server uses; there is no second listener and therefore no second bind-address default to get wrong.\n\n### Live verification\n\nAudit-host bind check (Windows 10):\n\n```\n$ netstat -an | findstr 5553\n  TCP    127.0.0.1:5553         0.0.0.0:0              LISTENING\n```\n\nConfirms the Windows default is `localhost`. The Linux/macOS bind to `0.0.0.0:5553` is documented in the code path above; it was not exercised on the audit machine because the audit host was Windows. A maintainer reproducing on a Linux host would see `0.0.0.0:5553 LISTENING` from `ss -tlnp`.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Algernon: Auto-refresh SSE event server binds to all interfaces by default on Linux/macOS in github.com/xyproto/algernon","format":"markdown","source":"go"},{"lang":"es","text":"Algernon es un pequeño servidor web autocontenido y puro Go. Antes de la versión 1.17.7, el servidor de eventos SSE se enlazaba a 0.0.0.0:5553 en Linux/macOS por defecto porque el valor predeterminado del host dependiente de la plataforma en engine/flags.go:39-46 establecía host = \"\" para sistemas que no eran Windows, y utils.JoinHostPort(\"\", \":5553\") se resuelve como \":5553\". Esta vulnerabilidad se corrige en la versión 1.17.7.","source":"nvd"}],"published":"2026-05-20T15:33:56.000Z","modified":"2026-07-24T11:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-668","CWE-1188"],"affected":[{"ranges":[{"version":"< 1.17.7","status":"affected"}],"vendor":"xyproto","product":"algernon","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.17.7"}],"ecosystem":"Go","package":"github.com/xyproto/algernon","purl":"pkg:golang/github.com/xyproto/algernon","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.17.7"}],"ecosystem":"Go","package":"github.com/xyproto/algernon","purl":"pkg:golang/github.com/xyproto/algernon","source":"go"}],"references":[{"url":"https://github.com/xyproto/algernon/security/advisories/GHSA-gj84-924c-48fx","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/xyproto/algernon","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-26T18:57:07.427Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46430","url":"https://www.cve.org/CVERecord?id=CVE-2026-46430","licence":"CVE Terms of Use","modified":"2026-05-26T18:57:12.882Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gj84-924c-48fx","url":"https://github.com/advisories/GHSA-gj84-924c-48fx","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:40.906Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5401","url":"https://pkg.go.dev/vuln/GO-2026-5401","licence":"CC-BY-4.0","modified":"2026-06-25T23:00:54.193Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46430","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46430","licence":"Public domain","modified":"2026-07-24T11:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:22.342Z","epss":{"score":0.00197,"percentile":0.09892,"date":"2026-12-01T12:00:22.000Z"}}