Skip to content

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

Moderate severity GitHub Reviewed Published Feb 20, 2026 in static-web-server/static-web-server • Updated Feb 23, 2026

Package

cargo static-web-server (Rust)

Affected versions

>= 2.1.0, < 2.41.0

Patched versions

2.41.0

Description

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.

References

Published to the GitHub Advisory Database Feb 20, 2026
Reviewed Feb 20, 2026
Published by the National Vulnerability Database Feb 21, 2026
Last updated Feb 23, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(4th percentile)

Weaknesses

Observable Response Discrepancy

The product provides different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside of the intended control sphere. Learn more on MITRE.

CVE ID

CVE-2026-27480

GHSA ID

GHSA-qhp6-635j-x7r2

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.