CVE-2026-45721
Beskrivelse
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.
Beskrivelsen gjengis slik kilden har publisert den, på engelsk.
Nøkkelfakta
- Publisert
- 2026-05-26
- Sist endret
- 2026-07-24
- Tildelt av
- security-advisories@github.com
- CVSS-vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H- Scoret av
- security-advisories@github.com
- Sannsynlighet for utnyttelse
-
0.4 %
høyere enn 36 %
av alle kjente sårbarheter
EPSS, neste 30 dager, modell v2026.06.15 - Rettelse finnes
- Ikke registrert hos kildene
Berørte produkter
| Leverandør | Produkt | Versjoner | Status |
|---|---|---|---|
| github.com/xyproto | algernon (Go) | < 1.17.7 | Berørt |
Svakhetstype
-
CWE-20: Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
-
CWE-426: Untrusted Search Path
The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.
-
CWE-552: Files or Directories Accessible to External Parties
The product makes files or directories accessible to unauthorized actors, even though they should not be.
Angrepsteknikker
Utledet gjennom svakhetstypen: CVE til CWE til CAPEC til ATT&CK. Dette viser hvilke teknikker svakhetsklassen historisk brukes til. Det er ikke en påstand om at nettopp denne sårbarheten er utnyttet slik.
- T1003: OS Credential Dumping
- T1027: Obfuscated Files or Information
- T1036.001: Invalid Code Signature
- T1039: Data from Network Shared Drive
- T1119: Automated Collection
- T1213: Data from Information Repositories
- T1530: Data from Cloud Storage
- T1539: Steal Web Session Cookie
- T1552.001: Credentials In Files
- T1552.003: Shell History
- T1552.004: Private Keys
- T1552.006: Group Policy Preferences
- T1553.002: Code Signing
- T1555: Credentials from Password Stores
- T1574.006: Dynamic Linker Hijacking
- T1574.007: Path Interception by PATH Environment Variable
- T1574.009: Path Interception by Unquoted Path
- T1602: Data from Configuration Repository
Referanser
- https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc
- https://github.com/xyproto/algernon/security/advisories/GHSA-xwcr-wm99-g9jc
Berører dette dere?
En sårbarhet betyr bare noe hvis dere kjører produktet, i en berørt versjon, et sted en angriper kommer til.