{"id":"GHSA-gq3j-xvxp-8hrf","summary":"Hono added timing comparison hardening in basicAuth and bearerAuth","details":"## Summary\n\nThe `basicAuth` and `bearerAuth` middlewares previously used a comparison that was not fully timing-safe.\n\nThe `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.\n\nThe implementation has been updated to use a safer comparison method.\n\n\n## Details\n\nThe issue was caused by the use of normal string equality (`===`) when comparing hash values inside the `timingSafeEqual` function.\n\nIn 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.\n\nUnder very specific and controlled conditions, this behavior could theoretically allow timing-based analysis.\n\nThe implementation has been updated to:\n\n- Avoid early termination during comparison\n- Use a constant-time-style comparison method\n\n## Impact\n\nThis issue is unlikely to be exploited in normal environments.\n\nIt may only be relevant in highly controlled situations where precise timing measurements are possible.\n\nThis change is considered a security hardening improvement. Users are encouraged to upgrade to the latest version.","aliases":["CVE-2026-56764"],"modified":"2026-07-17T21:16:42.247988499Z","published":"2026-02-19T20:15:59Z","database_specific":{"github_reviewed_at":"2026-02-19T20:15:59Z","nvd_published_at":null,"cwe_ids":["CWE-208"],"severity":"LOW","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/honojs/hono/security/advisories/GHSA-gq3j-xvxp-8hrf"},{"type":"WEB","url":"https://github.com/honojs/hono/commit/91def7cab654bad5eecc9270e6620d577971ff5e"},{"type":"PACKAGE","url":"https://github.com/honojs/hono"},{"type":"WEB","url":"https://github.com/honojs/hono/releases/tag/v4.11.10"}],"affected":[{"package":{"name":"hono","ecosystem":"npm","purl":"pkg:npm/hono"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"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"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}