CVE-2026-56764
JSON

6.3medium

Hono - Timing Attack in basicAuth and bearerAuth Middleware

Severity
6.3medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.23% (higher than 14% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-gq3j-xvxp-8hrf

Description

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.

Affected

Product or packageVersionsReported by
Hono Honobefore 4.11.10
Not affected: 4.11.10
CVE List
hono (npm)before 4.11.10GitHub Advisory Database

All scores

VulnCheck6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
VulnCheck3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub3.7low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-208

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-56764 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-gq3j-xvxp-8hrf changed 2026-09-10CC-BY-4.0
NVDCVE-2026-56764 changed 2026-10-24Public domain