{"id":"CVE-2026-56764","aliases":["GHSA-gq3j-xvxp-8hrf"],"url":"https://o3.security/vulnerability/CVE-2026-56764","summary":"Hono - Timing Attack in basicAuth and bearerAuth Middleware","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.","published":"2026-07-15T11:25:32.814Z","modified":"2026-10-21T02:58:43.459228033Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"hono","fixedVersion":"4.11.10"}],"fix":{"url":"https://github.com/honojs/hono/commit/91def7cab654bad5eecc9270e6620d577971ff5e","label":"honojs/hono@91def7c"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56764.json"},{"type":"ADVISORY","url":"https://github.com/honojs/hono/security/advisories/GHSA-gq3j-xvxp-8hrf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56764"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/hono-timing-attack-in-basicauth-and-bearerauth-middleware"},{"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:58:43.459228033Z"}}