Advisory

GHSA-qhp6-635j-x7r2

Also known as: CVE-2026-27480

Summary

Static Web Server affected by timing-based username enumeration in Basic Authentication due to early response on invalid usernames

Details

Summary

A Timing-based username enumeration in Basic Authentication vulnerability due to early response on invalid usernames could allow attackers to identify valid users and focus their efforts on targeted brute-force or credential-stuffing attacks.

Details

SWS validates the provided username before performing any password verification.

  • Invalid Username: The server returns a 401 Unauthorized response immediately.
  • Valid Username: The server proceeds to verify the password (e.g., using bcrypt), which introduces a different execution path and measurable timing discrepancy.

This allows an attacker to distinguish between existing and non-existing accounts by analyzing response times.

PoC

The following statistical results were obtained by measuring the mean response time over 100 iterations using a custom Rust script:

| User Type | Average Response Time |
| :--- | :--- |
| Invalid User | 0.409861 ms |
| Valid User | 0.250925 ms |
| Difference | ~0.158936 ms |

While the valid user responded faster in this specific test environment, the statistically significant gap confirms that the authentication logic does not execute in constant time.

Impact

Users using the SWS' Basic Authentication feature are primarily impacted.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-02-20 18:25 UTC
Modified
2026-02-23 22:58 UTC

Affected packages and fixes

static-web-server

crates.io · All systems

Affected

  • introduced 2.1.0, fixed 2.41.0 (semver)

Fixed versions

2.41.0

Fix

  • Fixed version 2.41.0
    cargo update -p static-web-server --precise 2.41.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences