# CVE-2026-27480: Static Web Server: Timing-Based Username Enumeration in Basic Authentication

> Attackers can enumerate valid usernames via timing differences in Basic Authentication, facilitating targeted brute-force attacks against Static Web Server.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/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:** 21 Feb 2026
- **Updated:** 24 Feb 2026
- **Also known as:** GHSA-qhp6-635j-x7r2

## What is CVE-2026-27480?

CVE-2026-27480 is a medium-severity vulnerability in static-web-server, published on 21 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Static Web Server (SWS) is a production-ready web server suitable for static web files or assets. In versions 2.1.0 through 2.40.1, a timing-based username enumeration vulnerability in Basic Authentication allows attackers to identify valid users by exploiting early responses for invalid usernames, enabling targeted brute-force or credential-stuffing attacks. SWS checks whether a username exists before verifying the password, causing valid usernames to follow a slower code path (e.g., bcrypt hashing) while invalid usernames receive an immediate 401 response. This timing discrepancy allows attackers to enumerate valid accounts by measuring response-time differences. This issue has been fixed in version 2.41.0.

Weakness: CWE-204 (Observable Response Discrepancy)

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

2 open source packages ship an affected version, including static-web-server. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `static-web-server` | crates.io | From 2.1.0 | 2.41.0 |
| `static-web-server` | crates.io | From 2.1.0 | 2.41.0 |

Products: Static-Web-Server Static Web Server.

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

Upgrade static-web-server to 2.41.0 or later.

## Is CVE-2026-27480 being exploited?

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

## Other vulnerabilities in static-web-server

- [CVE-2025-67487](https://insights.sbomify.com/CVE-2025-67487/): Static Web Server is vulnerable to symbolic link Path Traversal (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-27480 is a medium-severity vulnerability in static-web-server, published on 21 Feb 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-27480 exists.

Affected packages and fixed versions:
- static-web-server (crates.io): affected from 2.1.0; fixed in 2.41.0
- static-web-server (crates.io): affected from 2.1.0; fixed in 2.41.0

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-27480/ (Markdown: https://insights.sbomify.com/CVE-2026-27480/index.md)
```

## Sources

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

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