Hono added timing comparison hardening in basicAuth and bearerAuth
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-208.
Summary
## Summary The `basicAuth` and `bearerAuth` middlewares previously used a comparison that was not fully timing-safe. The `timingSafeEqual` function used normal string equality (`===`) when comparing hash values. This comparison may stop early if values differ, which can theoretically cause small timing differences. The implementation has been updated to use a safer comparison method. ## Details The issue was caused by the use of normal string equality (`===`) when comparing hash values inside the `timingSafeEqual` function. In JavaScript, string comparison may stop as soon as a difference is found. This means the comparison time can slightly vary depending on how many characters match. Under very specific and controlled conditions, this behavior could theoretically allow timing-based analysis. The implementation has been updated to: - Avoid early termination during comparison - Use a constant-time-style comparison method ## Impact This issue is unlikely to be exploited in normal environments. It may only be relevant in highly controlled situations where precise timing measurements are possible. This change is considered a security hardening improvement. Users are encouraged to upgrade to the latest version.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | hono (npm) | before 4.11.10 | 4.11.10 | Patch available | GHSA-gq3j-xvxp-8hrf |
- hono (npm) Vendor— Affected before 4.11.10 Fixed in 4.11.10 Patch available GHSA-gq3j-xvxp-8hrf
Remediation
- Fix · GHSA-gq3j-xvxp-8hrf hono (npm) Fixed in 4.11.10 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-gq3j-xvxp-8hrf
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences