# CVE-2026-45728: Algernon: Single-file mode unconditionally enables debug mode

> Attackers can read server-side source code and data files by triggering errors in single-file mode, which inadvertently enables debug mode.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 May 2026
- **Updated:** 26 May 2026
- **Also known as:** GHSA-fwqx-8365-9983, GO-2026-5385

## What is CVE-2026-45728?

CVE-2026-45728 is a high-severity vulnerability in xyproto algernon, published on 26 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-540 (Inclusion of Sensitive Information in Source Code), CWE-489 (Active Debug Code), CWE-209 (Generation of Error Message Containing Sensitive Information), CWE-1188 (Initialization of a Resource with an Insecure Default)

## Which versions are affected by CVE-2026-45728?

3 open source packages ship an affected version, including github.com/xyproto/algernon.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/xyproto/algernon` | Go | All versions | 1.17.7 |
| `github.com/xyproto/algernon` | Go | All versions | 1.17.7 |
| `github.com/xyproto/algernon` | Go | All versions | 1.17.7 |

## How do I fix CVE-2026-45728?

Upgrade github.com/xyproto/algernon to 1.17.7 or later.

## Is CVE-2026-45728 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45728 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45728 and fix it if it is affected.

What it is: CVE-2026-45728 is a high-severity vulnerability in xyproto algernon, published on 26 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45728 exists.

Affected packages and fixed versions:
- github.com/xyproto/algernon (Go): affected all versions; fixed in 1.17.7
- github.com/xyproto/algernon (Go): affected all versions; fixed in 1.17.7
- github.com/xyproto/algernon (Go): affected all versions; fixed in 1.17.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45728/ (Markdown: https://insights.sbomify.com/CVE-2026-45728/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45728
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45728
- OSV: https://osv.dev/vulnerability/CVE-2026-45728

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45728/
Summaries are generated and may contain mistakes; the official description above is the record.
