CVE-2026-71850: Hono: `memo()` retains SSR output across requests, leading to cross-user data disclosure
Summary
memo() from hono/jsx retains the result of a server-side render and reuses it for later renders with comparator-equal props. Request-scoped values read inside the component take no part in that comparison, so a response can contain HTML rendered for another user's request.
Details
Components wrapped with memo() are compared by props alone. Values read implicitly during rendering do not participate: JSX Context through createContext() and useContext(), useRequestContext() from hono/jsx-renderer, and getContext() from hono/context-storage. The retained result lives as long as the wrapped component, so it outlives the request that produced it.
Per-request context isolation is not what fails: the current request's values are established correctly, but the memoized component is skipped before anything reads them.
This issue arises when a component wrapped in memo() obtains user- or request-specific data from an ambient context instead of through props.
Impact
A user may receive a response containing HTML rendered for another user, when both render the same memoized component with comparator-equal props on the same warm instance.
This may lead to:
- Disclosure of another user's account or profile data - Disclosure of request-scoped secrets embedded in HTML, such as CSRF tokens - Exposure of role-specific content to users who should not receive it
Exploitation depends on the order in which renders populate the retained value and on both requests reaching the same warm instance.
This issue affects applications that render with hono/jsx on the server and wrap a component reading ambient request state in memo(). Applications that pass all request-specific values through props, or that do not use memo(), are unaffected. Client-side rendering is unaffected.
Other sources
Hono is a Web application framework that provides support for any JavaScript runtime. From 3.8.0 to 4.12.33, memo() from hono/jsx retains the result of a server side render and reuses it for later renders with comparator equal props, and request scoped values read inside the component take no part in that comparison, so a response can contain HTML rendered for another user's request. Components wrapped with memo() are compared by props alone; values read implicitly during rendering, such as JSX Context through createContext() and useContext(), useRequestContext() from hono/jsx-renderer, and getContext() from hono/context-storage, do not participate, and the retained result lives as long as the wrapped component, so it outlives the request that produced it. A user may receive a response containing HTML rendered for another user when both render the same memoized component with comparator equal props on the same warm instance, which may disclose another user's account or profile data, disclose request scoped secrets embedded in HTML such as CSRF tokens, or expose role specific content to users who should not receive it. This issue is fixed in version 4.12.34.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/honoto a version that resolves this vulnerability.Fixed in 4.12.34 - Upgrade
Upgrade
honoto a version that resolves this vulnerability.Fixed in 4.12.34
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71850?
The severity of CVE-2026-71850 is medium with a score of 4.8.
What risk does CVE-2026-71850 pose?
CVE-2026-71850 poses a risk score of 29.
How do I fix CVE-2026-71850?
To fix CVE-2026-71850, update to a version of hono where the vulnerability has been addressed.
What type of vulnerability is CVE-2026-71850?
CVE-2026-71850 is a cross-user data disclosure vulnerability due to improper handling of SSR output.
Which software is affected by CVE-2026-71850?
CVE-2026-71850 affects the hono/memo software package in npm.