{"id":"CVE-2026-56764","aliases":["CVE-2026-56764","GHSA-gq3j-xvxp-8hrf"],"related":[],"kind":"vulnerability","state":"published","title":"Hono - Timing Attack in basicAuth and bearerAuth Middleware","summary":"Hono before 4.11.10 contains a timing attack vulnerability in the basicAuth and bearerAuth middlewares due to non-constant-time string comparison in the timingSafeEqual function. Attackers can exploit early termination of string equality checks to infer valid credentials through precise timing measurements.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hono before 4.11.10 contains a timing attack vulnerability in the basicAuth and bearerAuth middlewares due to non-constant-time string comparison in the timingSafeEqual function. Attackers can exploit early termination of string equality checks to infer valid credentials through precise timing measurements.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hono anterior a la versión 4.11.10 contiene una vulnerabilidad de ataque de temporización en los middlewares basicAuth y bearerAuth debido a una comparación de cadenas de tiempo no constante en la función timingSafeEqual. Los atacantes pueden explotar la terminación temprana de las comprobaciones de igualdad de cadenas para inferir credenciales válidas mediante mediciones de temporización precisas.","source":"nvd"}],"published":"2026-02-19T20:15:59.000Z","modified":"2026-10-24T22:10:00.210Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"}],"cwes":["CWE-208"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.11.10","status":"affected"},{"type":"semver","version":"4.11.10","status":"unaffected"}],"vendor":"Hono","product":"Hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.11.10"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-gq3j-xvxp-8hrf","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/hono-timing-attack-in-basicauth-and-bearerauth-middleware","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/honojs/hono/commit/91def7cab654bad5eecc9270e6620d577971ff5e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.11.10","tags":["web"],"sources":["ghsa"]}],"credits":["Exagone313"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-15T13:49:48.538Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56764","url":"https://www.cve.org/CVERecord?id=CVE-2026-56764","licence":"CVE Terms of Use","modified":"2026-07-15T13:50:24.700Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gq3j-xvxp-8hrf","url":"https://github.com/advisories/GHSA-gq3j-xvxp-8hrf","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:35.112Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56764","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56764","licence":"Public domain","modified":"2026-10-24T22:10:00.210Z"}],"updatedAt":"2026-11-25T22:59:28.265Z","epss":{"score":0.00229,"percentile":0.14689,"date":"2026-12-01T12:00:22.000Z"}}