Vulnerabilidades do Xyproto Algernon
🔔 Criar alerta RSS Verificador de versão
CVEs publicadas que afetam Xyproto Algernon: 7 registro(s), com versões afetadas e correções.
CVE-2026-48126
Alta · 8.2
CWE-22 26/05/2026
Algernon: Host header path traversal in --domain mode reads files and runs Lua from parent dir
Algernon is a small self-contained pure-Go web server. Prior to 1.17.8, when algernon is started with --domain (or --letsencrypt, which silently turns on --domain at engine/flags.go:372), the request handler resolves the served directory by joining the configured --dir with the value of the client-supplied Host header. The join is performed by filepath.Join with no validation, so a Host: .. header walks one level above the document root. Subsequent file resolution then exposes everything in that parent directory — arbitrary file read, full directory listing, and, if any .lua file is present, server-side Lua execution. This vulnerability is fixed in 1.17.8.
CVE-2026-46431
Média · 4.3
CWE-942 26/05/2026
Algernon: Auto-refresh SSE event server sets Access-Control-Allow-Origin: *
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.
CVE-2026-46430
Média · 4.3
CWE-668 26/05/2026
Algernon: Auto-refresh SSE event server binds to all interfaces by default on Linux/macOS
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.
CVE-2026-45728
Alta · 7.5
CWE-209 26/05/2026
Algernon: Single-file mode unconditionally enables debug mode
Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, when Algernon is invoked with a single file path instead of a directory, singleFileMode is set to true and debugMode is forcibly enabled. debugMode activates the PrettyError renderer, which on any Lua or template error response dumps the absolute path of the file that errored, complete byte contents of that file, and exception or parser error text. This response is served with HTTP 200 OK to whoever sent the request that triggered the error. Any client able to reach the server and able to provoke a runtime error in the served script obtains the full server-side source of that script and of any sibling Lua data file consulted during the request. This vulnerability is fixed in 1.17.7.
CVE-2026-45721
Crítica · 9.0
CWE-20 26/05/2026
Servidor Web Algernon: Busca Ascendente de handler.lua Leva a Execução Remota de Código
Algernon é um pequeno servidor web autocontido, escrito em Go puro. Antes da versão 1.17.7, quando o Algernon recebe uma requisição para qualquer caminho de URL que resolva para um diretório sem arquivo de índice, DirPage percorre diretórios ancestrais — além da raiz configurada do servidor — procurando um arquivo chamado handler.lua para executar como manipulador da requisição. O laço termina somente após 100 passos ancestrais ou quando filepath.Dir retorna ., portanto, em qualquer caminho absoluto de raiz do servidor, a busca alcança a raiz do sistema de arquivos (/ em Unix, letra de unidade no Windows). O primeiro handler.lua encontrado é carregado no interpretador Lua com toda a API do Algernon exposta — incluindo run3(), httpclient, os.execute, io.popen, PQ, MSSQL, acesso bruto ao sistema de arquivos e o banco de dados userstate. Qualquer processo que possa gravar handler.lua em qualquer diretório pai da raiz do servidor obtém execução remota de código pré-autenticada na próxima requisição HTTP. Isso é alcançável sem autenticação — a busca ocorre antes que a verificação de permissão retorne um resultado (o sistema de permissões só controla prefixos de URL, não a etapa de resolução do manipulador), e qualquer URL apontando para um diretório sem índice dispara a busca. Em uma instalação padrão nova do Algernon, a requisição GET / é suficiente. Esta vulnerabilidade está corrigida na versão 1.17.7.
CVE-2026-43982
Alta · 8.7
CWE-22 26/05/2026
Algernon: Path traversal file write via savein()
Algernon is a small self-contained pure-Go web server. Prior to 1.17.6, uploadedFileSaveIn() in lua/upload/upload.go uses filepath.Join() with the caller-supplied directory but performs no boundary check after joining. A directory of ../../../tmp resolves cleanly to /tmp, outside the web root. This vulnerability is fixed in 1.17.6.
CVE-2026-43981
Alta · 8.2
CWE-362 26/05/2026
Algernon: Race Condition in handle() shared LState
Algernon is a small self-contained pure-Go web server. Prior to 1.17.6, in engine/luahandler.go, the sync.RWMutex protecting LoadCommonFunctions is released before L.Push() and L.PCall() execute. Since gopher-lua's LState is explicitly not goroutine-safe, concurrent requests race on the shared state causing Lua VM corruption. The Go race detector confirms this immediately under modest concurrency (ab -n 1000 -c 100). This vulnerability is fixed in 1.17.6.