CVE-2026-45721
Algernon: handler.lua discovery walks parent directories above the server root
Description
Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, when Algernon is asked for any URL path that resolves to a directory without an index file, DirPage walks upward through parent directories — past the configured server root — looking for a file named handler.lua to execute as the request handler. The loop terminates only after 100 ancestor steps or when filepath.Dir returns ., so on any absolute server-root path the search reaches the filesystem root (/ on Unix, drive letter on Windows). The first handler.lua it finds is loaded into the Lua interpreter with the full Algernon API exposed — including run3(), httpclient, os.execute, io.popen, PQ, MSSQL, raw filesystem access, and the userstate database. Any process that can write handler.lua anywhere in a parent directory of the server root obtains pre-authenticated remote code execution on the next HTTP request. This is reachable without authentication — the lookup happens before the permission check returns a hit (the perm system only gates URL prefixes, not the handler-resolution step), and any URL pointing at a directory without an index triggers the walk. On a fresh stock Algernon install the request GET / is enough. This vulnerability is fixed in 1.17.7.
INFO
Published Date :
May 26, 2026, 5:16 p.m.
Last Modified :
July 24, 2026, 11:10 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | CRITICAL | [email protected] |
Solution
- Update Algernon to version 1.17.7 or newer.
- Remove any unauthorized handler.lua files.
- Validate server root configuration settings.
- Restrict file write permissions.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-45721.
| URL | Resource |
|---|---|
| https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc | |
| https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-45721 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-45721
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-45721 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-45721 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 24, 2026
Action Type Old Value New Value Added Translation Title: Algernon de xyproto, Description: Algernon es un pequeño servidor web autocontenido y puro-Go. Antes de la versión 1.17.7, cuando se le solicita a Algernon cualquier ruta URL que se resuelva en un directorio sin un archivo de índice, DirPage asciende a través de los directorios padre - más allá de la raíz del servidor configurada - buscando un archivo llamado handler.lua para ejecutar como gestor de solicitudes. El bucle termina solo después de 100 pasos de ancestro o cuando filepath.Dir devuelve ., por lo que en cualquier ruta absoluta de la raíz del servidor la búsqueda alcanza la raíz del sistema de archivos (/ en Unix, letra de unidad en Windows). El primer handler.lua que encuentra se carga en el intérprete de Lua con la API completa de Algernon expuesta - incluyendo run3(), httpclient, os.execute, io.popen, PQ, MSSQL, acceso directo al sistema de archivos y la base de datos de estado de usuario. Cualquier proceso que pueda escribir handler.lua en cualquier lugar de un directorio padre de la raíz del servidor obtiene ejecución remota de código preautenticada en la siguiente solicitud HTTP. Esto es alcanzable sin autenticación - la búsqueda ocurre antes de que la verificación de permisos devuelva un acierto (el sistema de permisos solo restringe los prefijos URL, no el paso de resolución del gestor), y cualquier URL que apunte a un directorio sin un índice activa el recorrido. En una instalación nueva y estándar de Algernon la solicitud GET / es suficiente. Esta vulnerabilidad se corrige en la versión 1.17.7. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'xyproto', 'product': 'algernon', 'versions': [{'status': 'affected', 'version': '< 1.17.7'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-45721', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-05-26T17:13:14.630410Z'} -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
May. 26, 2026
Action Type Old Value New Value Added Reference https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc -
New CVE Received by [email protected]
May. 26, 2026
Action Type Old Value New Value Added Description Algernon is a small self-contained pure-Go web server. Prior to 1.17.7, when Algernon is asked for any URL path that resolves to a directory without an index file, DirPage walks upward through parent directories — past the configured server root — looking for a file named handler.lua to execute as the request handler. The loop terminates only after 100 ancestor steps or when filepath.Dir returns ., so on any absolute server-root path the search reaches the filesystem root (/ on Unix, drive letter on Windows). The first handler.lua it finds is loaded into the Lua interpreter with the full Algernon API exposed — including run3(), httpclient, os.execute, io.popen, PQ, MSSQL, raw filesystem access, and the userstate database. Any process that can write handler.lua anywhere in a parent directory of the server root obtains pre-authenticated remote code execution on the next HTTP request. This is reachable without authentication — the lookup happens before the permission check returns a hit (the perm system only gates URL prefixes, not the handler-resolution step), and any URL pointing at a directory without an index triggers the walk. On a fresh stock Algernon install the request GET / is enough. This vulnerability is fixed in 1.17.7. Added CVSS V3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H Added CWE CWE-20 Added CWE CWE-426 Added CWE CWE-552 Added Reference https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc