Severity
Details
- CVSS score
- 2.3
- CVSS vector
- CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Overview
About vulnerability
Summary
hono/jsx does not HTML-escape a plain string placed directly as a child or fallback of Suspense or ErrorBoundary, as the only child of a Context.Provider, or as the root value of renderToString() / renderToReadableStream() from hono/jsx/dom/server. Such a string is emitted as markup instead of text.
Details
These paths stringify their input and treat the result as already-escaped HTML, so a plain string passes through unchanged. Notable cases:
Suspense: a string child, or a stringfallbackwhile a child suspends. With streaming, the fallback reaches the browser in the initial chunk.ErrorBoundary: a string child alongside an asynchronous sibling. The all-synchronous case was fixed in 4.11.7 (GHSA-9r54-q6cx-xmh5).Context.Provider: a single string child. Multiple children are escaped.hono/jsx/dom/server: a string, or an array containing strings, passed as the root.
A lone {children} forwarded by a wrapper component is enough to reach these paths. Strings wrapped in an element, values from raw() or the html helper, and client-side rendering with hono/jsx/dom are not affected.
Impact
An attacker who controls a string rendered in an affected position can inject arbitrary HTML into the server-rendered page, leading to cross-site scripting under the application’s origin.
This issue affects applications that render untrusted strings directly in one of the positions above during server-side rendering.
Details
- Affected product:
- Node.js , create-module-federation , create-zephyr-apps , hono , honojs/middleware , modern-js-app-tools , modern-js-babel-compiler , modern-js-babel-plugin-module-resolver , modern-js-babel-preset , modern-js-core , modern-js-flight-server-transform-plugin , modern-js-plugin-bff , modern-js-plugin-i18n , modern-js-plugin-polyfill , modern-js-plugin-ssg , modern-js-prod-server , modern-js-rsbuild-plugin-esbuild , modern-js-server , modern-js-server-core , modern-js-server-runtime , modern-js-server-utils , modern-js-tsconfig , modern-js-uni-builder , modern-js-utils , modern.js , module-federation-bridge-shared , module-federation-bridge-vue3 , module-federation-core , module-federation-devtools , module-federation-modern-js , module-federation-retry-plugin , module-federation-rsbuild-plugin , rollup-plugin-zephyr , vite-plugin-tanstack-start-zephyr , vite-plugin-vinext-zephyr , vite-plugin-zephyr , web-infra-dev/modern.js , with-zephyr , workflow-world-testing , zephyr-agent , zephyr-astro-integration , zephyr-edge-contract , zephyr-metro-plugin , zephyr-modernjs-plugin , zephyr-nuxt-module , zephyr-packages , zephyr-repack-plugin , zephyr-rolldown-plugin , zephyr-rsbuild-plugin , zephyr-rspack-plugin , zephyr-rspress-plugin , zephyr-webpack-plugin , zephyr-xpack-internal
- Affected packages:
- hono @ 4.12.16 (+680 more)