GHSA-gq3j-xvxp-8hrf

Suggest an improvement
Source
https://github.com/advisories/GHSA-gq3j-xvxp-8hrf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-gq3j-xvxp-8hrf/GHSA-gq3j-xvxp-8hrf.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-gq3j-xvxp-8hrf
Downstream
Related
Published
2026-02-19T20:15:59Z
Modified
2026-02-20T23:43:48.760052Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
Hono added timing comparison hardening in basicAuth and bearerAuth
Details

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.

Database specific
{
    "severity": "LOW",
    "cwe_ids": [
        "CWE-208"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-02-19T20:15:59Z",
    "nvd_published_at": null
}
References

Affected packages

npm / hono

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.11.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-gq3j-xvxp-8hrf/GHSA-gq3j-xvxp-8hrf.json"