İçeriğe atla
Noroxi
OSV ekosistem danışmanlığı

GHSA-9v4j-7g44-qcqw: Algernon: Auto-refresh SSE event server binds to all interfaces with Access-Control-Allow-Origin: * and no authentication

OrtaCVSS 5.3 · v3.1—İstismar yok Düzeltme var

Noroxi değerlendirmesi

Öncelik: İzleyin (aksiyon skoru 21/100)

  • İzlediğimiz kaynaklarda (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) herkese açık istismar kodu ya da sahada sömürü kaydı yok.
  • İnternetten erişebilen herkes tetikleyebilir. Hesap ya da parola gerekmez. Kullanıcının bir şey yapması gerekmez. Özel bir koşul gerekmez; tekrarlanabilir.
  • Düzeltilmiş sürüm: github.com/xyproto/algernon (Go) 1.17.7.

Şimdilik düşük öncelik. github.com/xyproto/algernon (Go) 1.17.7 ya da daha yeni sürüme yükseltin.

Kaydın verisinden otomatik üretilir: CVSS (NVD ve CNA), CISA KEV ve SSVC, FIRST EPSS, istismar kaynakları, düzeltme sürümleri. Nasıl hesaplıyoruz

Birincil kaynaklar: OSV

### Summary When auto-refresh is enabled, Algernon spins up an SSE handler that streams a `data:` line for every filesystem event under the watched directory. The handler performs **no authentication** of any kind — no shared token, no cookie check against the `permissions2` userstate, no IP allow-list, no path-prefix permission. Any client that can complete a TCP connection to the listener address receives the stream. This advisory covers the authentication gap in isolation. The cross-origin browser-reach (advisory #2b) and the network-reach (advisory #2c) amplify the impact, but each is independently fixable; this finding addresses the case where a same-origin or LAN-local client connects directly to the SSE port and reads the stream without proving anything about its identity. ### Details #### Root cause — the SSE handler does not consult `permissions2` or any other auth ```go // vendor/github.com/xyproto/recwatch/eventserver.go:100-144 (1.17.6) func GenFileChangeEvents(events TimeEventMap, mut *sync.Mutex, maxAge time.Duration, allowed string) http.HandlerFunc { return func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/event-stream;charset=utf-8") w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") w.Header().Set("Access-Control-Allow-Origin", allowed) // ... loop emits one SSE record per filename touched ... } } ``` Note the handler signature: `func(w http.ResponseWriter, _ *http.Request)`. The request is discarded — no `Cookie`, `Authorization`, query-string, or remote-IP check is performed before the stream begins. In 1.17.6 the listener was placed on its own `http.ServeMux` ([recwatch/eventserver.go:200-215](../vendor/github.com/xyproto/recwatch/eventserver.go)), wholly outside the `perm.Rejected` middleware chain that gates Algernon's main HTTP listener. Even an operator who had configured admin/user path prefixes via `perm.AddAdminPath`, set a `cookieSecret`, and forced authentication on every URL of the main server had no way to gate this listener — it was unreachable from the `mux` argument the perm middleware uses. #### Why authentication matters for this listener The stream contents are not public data. They reveal: - Which files the developer is actively editing, with sub-second timing precision. - The existence of files inside the watched root (including files the operator may have meant to keep private — `.env.local`, `secrets.lua`, in-progress draft files). - By inference, the directory layout of the project. A client that can connect to the listener obtains a low-rate continuous information disclosure for the lifetime of the connection. The handler is an infinite `for {}` loop — there is no natural session boundary or expiry. #### Source-level evidence ```text $ rg -n 'GenFileChangeEvents|EventServer\(' vendor/github.com/xyproto/recwatch/ vendor/github.com/xyproto/recwatch/eventserver.go:101:func GenFileChangeEvents(events TimeEventMap, mut *sync.Mutex, maxAge time.Duration, allowed string) http.HandlerFunc { vendor/github.com/xyproto/recwatch/eventserver.go:177:func EventServer(path, allowed, eventAddr, eventPath string, refreshDuration time.Duration) { $ rg -n 'Cookie|Authorization|Token|state\.User' vendor/github.com/xyproto/recwatch/eventserver.go # zero matches — no authentication primitive is referenced anywhere in the file ``` ### PoC (against 1.17.6) ```bash # 1. Operator runs algernon with auto-refresh on a project directory: algernon -a /path/to/project # spins up :5553 on Linux/macOS, localhost:5553 on Windows # 2. Any client that can reach the listener connects without credentials: curl -sN http://<server>:5553/sse # => id: 0 # data: /path/to/project/secret-notes.md # # id: 1 # data: /path/to/project/.env.local ``` No `Cookie`, no `Authorization`, no `X-Token`, no preflight, no challenge. The connection succeeds and the stream is delivered for as long as the client keeps the socket open. ### Impact - **Confidentiality:** medium. Continuous information disclosure of filenames and edit timing to anyone who can connect. - **Integrity:** none. - **Availability:** low. Each connection consumes a goroutine indefinitely; many simultaneous connections can exhaust descriptors. ### Suggestions to fix **Primary fix — require a shared secret on the SSE endpoint.** The auto-refresh feature already injects a script into served HTML ([engine/sse.go:118-165](../engine/sse.go)); that script knows the SSE URL. Add a per-startup token, embed it in the injected JS, and require it on the SSE request: ```go // engine/sse.go -- in InsertAutoRefresh tmplData.SessionToken = ac.sseToken // generated once at startup, e.g. crypto/rand 32 bytes // JS: // var source = new EventSource('...?token={{.SessionToken}}'); // recwatch handler: // if subtle.ConstantTimeCompare([]byte(r.URL.Query().Get("token")), // []byte(serverToken)) != 1 { // http.Error(w, "forbidden", http.StatusForbidden); return // } ``` Cookie-bearing requests work too if `recwatch.EventServer` is moved behind `perm.Rejected` (see "Defence in depth"). The token approach is the smaller change. **Defence in depth — mount the SSE handler on the main mux.** Moving `recwatch.EventServerHandler` onto the main `http.ServeMux` automatically places the SSE handler behind whatever middleware the operator has configured — `perm.Rejected`, `tollbooth`, custom auth wrappers. This closes the same-origin half of the gap without a per-token implementation. Any dedicated-port path bypasses `perm.Rejected` because it uses its own `http.ServeMux`, and that path needs the token fix from "Primary fix" above. ### Live verification ``` $ ./algernon.exe --nodb --httponly --server -a --addr 127.0.0.1:18781 --quiet poc2/site $ ( curl -sN --max-time 4 http://127.0.0.1:5553/sse > stream.txt & sleep 1 echo "edit-1" >> poc2/site/secret-notes.md echo "edit-2" >> poc2/site/.env.local wait ) $ cat stream.txt id: 0 data: C:\Users\xbox\Desktop\VulnTesting\algernon-main\poc-test\poc2\site\secret-notes.md id: 1 data: C:\Users\xbox\Desktop\VulnTesting\algernon-main\poc-test\poc2\site\.env.local ``` No `Cookie`, no `Authorization` header. Stream delivered.

Güncelleme
25 Haz 2026
EPSS
—

Rapor araçları

JSON

Aksiyon skoru

21

İzleyin

Şimdilik düşük öncelik.

CVSS
21 / 40 · 5.3 / 10
CISA KEV
0 / 30 · Listede değil
EPSS
0 / 30 · —

Bu kayıt değişirse haber alın

  • KEV'de değil: sahada sömürü kaydı yok
  • Herkese açık istismar kodu kaydı yok
  • Düzeltme yayımlandı

Bunlardan biri değişirse günlük e-posta özetinde haber veririz.

GHSA-9v4j-7g44-qcqw kaydını takip edin

Ne zaman haber verilir

  • CISA KEV'e girdiğinde
  • istismar kodu ortaya çıktığında ya da silahlaştırıldığında
  • kayıt güncellendiğinde (düzeltme sürümü dahil)
  • EPSS bir haftada 20 puan arttığında

Günde bir e-posta özeti (06:00 UTC); webhook bağlarsanız KEV ve silahlaştırılmış istismar ücretli planda 10 dakikada bir, ücretsizde saat başı.

Ücretsiz hesapla ayrıca

  • CVE uyarıları: kullandığınız ürün ve sürümleri ekleyin, onları etkileyen yeni CVE'ler size gelsin
  • Site izleme: 1 site, kesintide anında e-posta
  • Alan adınızı ekleyin: alt alan adları ve ele geçirme riski her hafta taransın (1 alan adı)
  • Güvenlik araçlarında saatte 10, günde en çok 30 tarama (hesapsız günde 3), API anahtarı ve MCP
  • Taramalarınız tek panelde: bulgular, son taramada değişenler, alan adı ya da müşteri başına rapor (PDF, paylaşım bağlantısı)
Tüm ücretsiz araçlar

E-postayla kayıt olun · Hesabınız var mı? Giriş yapın

Ücretsiz hesap, kart istenmez. Takibi istediğiniz an bırakırsınız.

Sürümünüz etkileniyor mu? Kontrol edin

Noroxi analizi

Sizin ortamınızda ne anlama geliyor?

Yukarıdaki değerlendirme kaydın verisinden otomatik üretilir; ortamınızı bilmez. Bu açığın sizde gerçekten sömürülebilir olup olmadığını ve hangi önlemin yeteceğini ekibimiz sizin sistemlerinizde doğrular.

Bu ürünü kullanıyoruz, yardım isteyin

Etkilenen sistemler

Sürümünüz etkileniyor mu?

Ürünü seçip kullandığınız sürümü yazın. Bu kaydın sürüm aralıklarıyla tarayıcınızda karşılaştırılır; sürüm hiçbir yere gönderilmez.

ÜreticiÜrün
Gogithub.com/xyproto/algernon

Paket düzeyi etkilenme

OSV ve GitHub Advisory verisi: ekosistem, paket ve aralık. SBOM eşleşmesi bu tabloyu kullanır.

EkosistemPaketEtkilenen aralıkDüzeltme
Gogithub.com/xyproto/algernon1.17.7 öncesi1.17.7

Aynı üründe

Go: tüm kayıtlar

Aynı birincil ürünün en yüksek skorlu diğer kayıtları.

  • GO-2026-5300Algernon: Auto-refresh SSE event server binds to all interfaces with Access-Control-Allow-Origin: * and no authentication in…
    0İzleyin

Düzeltme

Hangi sürüme geçmeli

Üretici, paket deposu ve Microsoft kayıtlarından derlenen düzeltme sürümleri. Yükseltmeden önce üreticinin notunu doğrulayın.

Ürün / paketDüzeltilmiş sürümKaynak
Go:github.com/xyproto/algernon1.17.7Paket deposu (OSV)

İstismar durumu

Bilinen kamuya açık istismar yok

Şu an kamuya açık bir istismar görülmedi. Bu, güvende olduğunuz anlamına gelmez; yalnızca eşiğin biraz daha yüksek olduğunu gösterir.

Araştırma bağlamı

Pentester ve araştırmacı için: saldırı profili, puan anlaşmazlığı, zaman çizelgesi, yama commit’leri, kredi, varyant ve zincir adayları, bug bounty kapsamı. Hepsi mevcut veriden türetilir; istismar kodu içermez.

Zaman çizelgesi

Yayından bugüne: kavram kanıtı, Metasploit modülü, CISA KEV ve düzeltme kaydı. Tarihler kaynakların bildirdiği tarihlerdir.

Yayın dışında tarihli olay yok.

Bu kayıtta yok: EPSS geçmişi · yama commit'i ya da PR bağlantısı · araştırmacı kredisi · varyant ya da zincir adayı · herkese açık ödül programı.

Teknik detay

Saldırı koşulları

  • İnternetten erişebilen herkes tetikleyebilir.
  • Hesap ya da parola gerekmez.
  • Kullanıcının bir şey yapması gerekmez.
  • Özel bir koşul gerekmez; tekrarlanabilir.

Başarılı olursa

Gizlilik
düşük · veriler okunabilir
Bütünlük
yok
Erişilebilirlik
yok
Saldırı vektörü
Ağ
Karmaşıklık
Düşük
Gereken yetki
Yok
Kullanıcı etkileşimi
Gerekmez
Kapsam
Değişmez
Gizlilik etkisi
Düşük
Bütünlük etkisi
Yok
Erişilebilirlik etkisi
Yok

CVSS vektörü

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

osv

Saldırı bağlamı

Bu zafiyet sınıfının (CWE) MITRE CAPEC saldırı desenleri ve ATT&CK teknikleri. Tespit kuralı ve tehdit avı için başlangıç noktası.

Referanslar

Tüm referansları göster (1 daha)

Üretici bildirimleri ve resmî kayıtlar. İstismar/PoC bağlantıları bilinçli olarak dışarıda bırakıldı.

Tüm kayıtlar