CVE-2025-71381
Deferred Deferred - Pending Action

Hono CORS Middleware Vary Header Reflection Vulnerability

Vulnerability report for CVE-2025-71381, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-30

Last updated on: 2026-07-01

Assigner: VulnCheck

Description

Hono before 4.10.2 (fixed in 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-06-30
Last Modified
2026-07-01
Generated
2026-07-21
AI Q&A
2026-07-01
EPSS Evaluated
2026-07-19
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
hono hono to 4.10.2|start_including=4.10.3 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-113 The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability exists in Hono versions before 4.10.2 and is fixed in 4.10.3. It is related to the CORS middleware, which incorrectly handles the Vary header. When the origin is not set to "*", the middleware copies the Vary header from the incoming request into the response. Since the Vary header is a response header that should be controlled by the server, an attacker can supply arbitrary Vary values that get reflected in the response.

This flaw can lead to cache key pollution and inconsistent enforcement of CORS policies, especially in environments that use shared caches or proxies.

Detection Guidance

To detect this vulnerability on your network or system, you can monitor HTTP responses from Hono servers for unexpected or attacker-controlled Vary headers when the Origin header is not set to "*".

One approach is to send HTTP requests with custom Vary headers and observe if those headers are reflected in the response, indicating the vulnerable middleware behavior.

Example commands using curl to test for this vulnerability:

  • curl -i -H "Origin: http://example.com" -H "Vary: X-Custom-Test" http://target-hono-server/
  • Check the response headers for the presence of the injected "Vary: X-Custom-Test" header. If it appears, the server is likely vulnerable.

Additionally, monitoring logs or using network inspection tools to detect unusual or unexpected Vary headers in responses from Hono servers before version 4.10.3 can help identify exploitation attempts or presence of the vulnerability.

Impact Analysis

The vulnerability can cause cache key pollution, meaning that attackers can manipulate cache behavior by injecting arbitrary Vary header values. This can result in inconsistent CORS enforcement, potentially allowing unauthorized cross-origin requests to succeed or legitimate requests to be blocked incorrectly.

In environments relying on shared caches or proxies, this inconsistency can lead to security risks such as data leakage or unauthorized access due to improper CORS policy enforcement.

Compliance Impact

This vulnerability in Hono's CORS middleware can lead to cache key pollution and inconsistent CORS enforcement in environments using shared caches or proxies. Such issues may increase the risk of unauthorized data exposure or access control failures.

While the CVE description does not explicitly mention compliance with standards like GDPR or HIPAA, the potential for inconsistent access control and data exposure could negatively impact compliance with these regulations, which require strict controls on data privacy and security.

Mitigation Strategies

To mitigate this vulnerability, upgrade Hono to version 4.10.3 or later, where the flaw in the CORS middleware has been fixed.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-71381. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart