{"id":"CVE-2025-71381","aliases":["CVE-2025-71381","GHSA-q7jf-gf43-6x6p"],"related":[],"kind":"vulnerability","state":"published","title":"Hono - Vary Header Injection in CORS Middleware","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary  \nA 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.\n\n### Details  \nThe 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.\n\nMost environments will see impact only when shared caches or proxies rely on the `Vary` header. The practical effect varies by configuration.\n\n### Impact  \nMay cause cache key pollution and inconsistent CORS enforcement in certain setups. No direct confidentiality, integrity, or availability impact in default configurations.  \n\n### Resolution  \nUpdate to the latest patched release. The CORS middleware has been corrected to handle `Vary` exclusively as a response header.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-10-24T19:15:13.000Z","modified":"2026-10-29T21:17:05.513Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","score":4.2,"rating":"MEDIUM"}],"cwes":["CWE-113","CWE-444"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.10.3","status":"affected"},{"type":"semver","version":"4.10.3","status":"unaffected"}],"vendor":"Hono","product":"Hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.10.3"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-q7jf-gf43-6x6p","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/hono-vary-header-injection-in-cors-middleware","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71381","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono/commit/d9b8b4b73b4f997994f2764013207365fe711282","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-01T13:19:11.943Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71381","url":"https://www.cve.org/CVERecord?id=CVE-2025-71381","licence":"CVE Terms of Use","modified":"2026-10-29T21:15:18.744Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q7jf-gf43-6x6p","url":"https://github.com/advisories/GHSA-q7jf-gf43-6x6p","licence":"CC-BY-4.0","modified":"2026-10-02T18:45:04.883Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71381","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71381","licence":"Public domain","modified":"2026-10-29T21:17:05.513Z"}],"updatedAt":"2026-11-25T22:59:12.368Z","epss":{"score":0.003,"percentile":0.24423,"date":"2026-12-01T12:00:22.000Z"}}