CVE-2025-71381
JSON

6.9medium

Hono - Vary Header Injection in CORS Middleware

Severity
6.9medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.30% (higher than 24% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-q7jf-gf43-6x6p

Description

Hono before 4.10.3 contains a flaw in its CORS middleware: when the origin is not set to "*", the middleware copies the Vary header from the incoming request into the response. Because Vary is a response header that should be managed by the server, an attacker can supply arbitrary Vary values that are reflected into the response, potentially causing cache key pollution and inconsistent CORS enforcement in environments that rely on shared caches or proxies.

Affected

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

All scores

VulnCheck6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
VulnCheck6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
GitHub4.2medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Classification

CWE-113CWE-444

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

What each source says

CVE List

Hono before 4.10.3 contains a flaw in its CORS middleware: when the origin is not set to "*", the middleware copies the Vary header from the incoming request into the response. Because Vary is a response header that should be managed by the server, an attacker can supply arbitrary Vary values that are reflected into the response, potentially causing cache key pollution and inconsistent CORS enforcement in environments that rely on shared caches or proxies.

GitHub Advisory Database
Summary

A flaw in the CORS middleware allowed request Vary headers to be reflected into the response, enabling attacker-controlled Vary values and potentially affecting cache behavior.

Details

The middleware previously copied the Vary header from the request when origin was not set to "*". Since Vary is a response header that should only be managed by the server, this could allow an attacker to influence caching behavior or cause inconsistent CORS handling.

Most environments will see impact only when shared caches or proxies rely on the Vary header. The practical effect varies by configuration.

Impact

May cause cache key pollution and inconsistent CORS enforcement in certain setups. No direct confidentiality, integrity, or availability impact in default configurations.

Resolution

Update to the latest patched release. The CORS middleware has been corrected to handle Vary exclusively as a response header.

NVD (es)

Hono anterior a 4.10.2 (corregido en 4.10.3) contiene una vulnerabilidad en su middleware CORS: cuando el origen no está configurado como '*', el middleware copia el encabezado Vary de la solicitud entrante a la respuesta. Debido a que Vary es un encabezado de respuesta que debería ser gestionado por el servidor, un atacante puede proporcionar valores Vary arbitrarios que se reflejan en la respuesta, lo que podría causar contaminación de la clave de caché y una aplicación inconsistente de CORS en entornos que dependen de cachés compartidas o proxies.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-71381 changed 2026-10-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-q7jf-gf43-6x6p changed 2026-10-02CC-BY-4.0
NVDCVE-2025-71381 changed 2026-10-29Public domain