GHSA-f23p-vx2j-j53r CVE-2026-71850
Hono: `memo()` retains SSR output across requests, leading to cross-user data disclosure
- Severity
- 4.8 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.27%
- Chance of exploitation in the next 30 days. Higher than 18.88% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-488 Exposure of Data Element to Wrong Session
- Fix
4.12.34- Upgrade hono to this version or later
Description
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.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| hono | >= 3.8.0, < 4.12.34 |
4.12.34 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
hono npm → 4.12.34
- npm
npm install hono@4.12.34- yarn
yarn add hono@4.12.34- pnpm
pnpm add hono@4.12.34
Severity breakdown
CVSS 3.1 4.8
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-488: Exposure of Data Element to Wrong Session
The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.
How to prevent it
- Architecture and Design: Protect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.
- Testing: Use a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).
- Architecture and Design: In a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-5r4p-p66f-jhc7 Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths | Medium | Also affects hono |
| GHSA-hxh3-vqpv-xpqv hono/jsx renders plain strings unescaped in boundary components, leading to XSS | Low | Also affects hono |
| GHSA-gqvv-2mrq-wpjv Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside the output directory | Medium | Also affects hono |
| GHSA-g6gw-c38x-mqfc Hono: Unbounded dot-notation nesting in `parseBody()` can cause memory exhaustion | Medium | Also affects hono |
| GHSA-crvj-82cr-hjcx Hono: Query parser reads parameters after the URL fragment, causing cache-key and proxy interpretation differentials | Medium | Also affects hono |
| GHSA-79qm-7rj5-m7r9 Hono: Proxy Helper does not remove response headers listed in the `Connection` header | Low | Also affects hono |
| GHSA-54fx-42gc-7vw4 Hono: Algorithmic Complexity DoS in Language Middleware | Medium | Also affects hono |
| GHSA-8j4g-w8fx-2239 Hono: ReDoS in CORS middleware via Access-Control-Request-Headers | Medium | Also affects hono |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor