Overview
About vulnerability
H3 is a minimal H(TTP) framework. In versions 2.0.0-0 through 2.0.1-rc.16, themount() method in h3 uses a simple startsWith() check to determine whether incoming requests fall under a mounted sub-application’s path prefix. Because this check does not verify a path segment boundary (i.e., that the next character after the base is / or end-of-string), middleware registered on a mount like /admin will also execute for unrelated routes such as /admin-public, /administrator, or /adminstuff. This allows an attacker to trigger context-setting middleware on paths it was never intended to cover, potentially polluting request context with unintended privilege flags. Version 2.0.2-rc.17 contains a patch.
Details
- Affected product:
- astro , cli , devframe , devtools , h3 , listhen , nitro , nuxt , unstorage , uploadthing , vite , vite-dev-rpc , vite-hot-client , vite-plugin-checker , vite-plugin-inspect , vite-plugin-vue , vite-plugin-vue-inspector
- Affected packages:
- h3 @ 1.15.11 (+94 more)
mount() method in h3 uses a simple startsWith() check to determine whether incoming requests fall under a mounted sub-application’s path prefix. Because this check does not verify a path segment boundary (i.e., that the next character after the base is / or end-of-string), middleware registered on a mount like /admin will also execute for unrelated routes such as /admin-public, /administrator, or /adminstuff. This allows an attacker to trigger context-setting middleware on paths it was never intended to cover, potentially polluting request context with unintended privilege flags. Version 2.0.2-rc.17 contains a patch.