{"id":"CVE-2026-73423","aliases":["CVE-2026-73423","GHSA-8mv7-9c27-98vc"],"related":[],"kind":"vulnerability","state":"published","title":"Astro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered","summary":"Astro is a web framework for content-driven websites. From 7.0.0 until 7.0.6, the composable astro/hono pipeline installs security.checkOrigin only through the middleware() primitive, while actions() and pages() can dispatch to user code independently. Mounting actions() before middleware(), as in the examples/advanced-routing example and Cloudflare Hono documentation, allows cross-origin form-encoded action requests to execute before the origin check, and using pages() without middleware() drops the check for on-demand endpoints and pages. The flaw enables blind write-only cross-site request forgery using the victim's cookies against ActionHandler.handle and PagesHandler.handleWithErrorFallback when manifest.checkOrigin is enabled; the attacker can trigger a state-mutating action or endpoint handler but cannot read the cross-origin response. The default non-composable astro() pipeline is not affected. This issue is fixed in version 7.0.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Astro is a web framework for content-driven websites. From 7.0.0 until 7.0.6, the composable astro/hono pipeline installs security.checkOrigin only through the middleware() primitive, while actions() and pages() can dispatch to user code independently. Mounting actions() before middleware(), as in the examples/advanced-routing example and Cloudflare Hono documentation, allows cross-origin form-encoded action requests to execute before the origin check, and using pages() without middleware() drops the check for on-demand endpoints and pages. The flaw enables blind write-only cross-site request forgery using the victim's cookies against ActionHandler.handle and PagesHandler.handleWithErrorFallback when manifest.checkOrigin is enabled; the attacker can trigger a state-mutating action or endpoint handler but cannot read the cross-origin response. The default non-composable astro() pipeline is not affected. This issue is fixed in version 7.0.6.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIn the composable `astro/hono` pipeline, the `security.checkOrigin` protection is only installed by the `middleware()` primitive. The `actions()` and `pages()` primitives each dispatch to user code independently, so a pipeline that mounts either primitive before (or without) `middleware()` will bypass the origin check for those requests.\n\n## Details\n\n`security.checkOrigin` (default: `true`) is intended to reject cross-site `POST`/`PUT`/`PATCH`/`DELETE` form submissions. In the classic pipeline (`astro()` all-in-one), the check always runs because Astro injects a virtual middleware module even when the user has no `src/middleware.ts`. In the composable `astro/hono` pipeline, the user assembles primitives manually. The check is only installed inside `middleware()` — so:\n\n- Mounting `actions()` before `middleware()` allows cross-origin form-encoded action requests to execute before the gate runs. The `examples/advanced-routing` example and the Cloudflare `hono` docs shipped this order.\n- Omitting `middleware()` entirely (reasonable for apps with no custom middleware) silently drops `checkOrigin` protection for all on-demand endpoints and pages dispatched through `pages()`.\n\nThe attack is a blind write-only CSRF: the attacker can trigger a state-mutating action or endpoint handler using the victim's cookies, but cannot read the cross-origin response body.\n\n## Affected versions\n\nAstro `>= 7.0.0` when using the composable `astro/hono` pipeline with either:\n- `actions()` mounted before `middleware()`, or\n- `pages()` used without `middleware()`\n\nThe default (non-composable) pipeline is not affected.\n\n## Fix\n\nThe origin check is now applied at each dispatch sink (`ActionHandler.handle` and `PagesHandler.handleWithErrorFallback`), gated on `manifest.checkOrigin`, using the same predicate as the middleware. The check is order-independent and a no-op when `middleware()` has already run.\n\nFix: https://github.com/withastro/astro/pull/17250\n\n## Workaround\n\nEnsure `middleware()` is mounted before both `actions()` and `pages()` in the composable pipeline, and that it is always included even when no custom middleware logic is needed:\n\n```ts\napp.use(middleware());\napp.use(actions());\napp.use(pages());\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Astro es un framework web para sitios web basados en contenido. Desde la versión 7.0.0 hasta la 7.0.6, la pipeline componible astro/hono instala security.checkOrigin solo a través de la primitiva middleware(), mientras que actions() y pages() pueden despachar a código de usuario de forma independiente. Montar actions() antes de middleware(), como en el ejemplo examples/advanced-routing y la documentación de Cloudflare Hono, permite que las peticiones de acción codificadas en farmulario de origen cruzado se ejecuten antes de la verificación de origen, y usar pages() sin middleware() omite la verificación para endpoints y páginas bajo demya. La vulnerabilidad permite la falsificación de petición en sitios cruzados ciega de solo escritura utilizyo las cookies de la víctima contra ActionHyler.hyle y PagesHyler.hyleWithErrorFallback cuyo manifest.checkOrigin está habilitado; el atacante puede desencadenar una acción o un gestor de endpoint que muta el estado, pero no puede leer la respuesta de origen cruzado. La pipeline astro() no componible predeterminada no se ve afectada. Este problema está solucionado en la versión 7.0.6.","source":"nvd"}],"published":"2026-07-20T23:26:27.000Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","rating":"MEDIUM"}],"cwes":["CWE-352"],"affected":[{"ranges":[{"version":">= 7.0.0, < 7.0.6","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.0.6"}],"ecosystem":"npm","package":"astro","purl":"pkg:npm/astro","source":"ghsa"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-8mv7-9c27-98vc","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/pull/17250","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/commit/0b30b35f864310bee8485c952d1877e82e2b9b1a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/releases/tag/astro@7.0.6","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-13T17:49:22.329Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-73423","url":"https://www.cve.org/CVERecord?id=CVE-2026-73423","licence":"CVE Terms of Use","modified":"2026-08-13T17:53:25.469Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8mv7-9c27-98vc","url":"https://github.com/advisories/GHSA-8mv7-9c27-98vc","licence":"CC-BY-4.0","modified":"2026-08-12T20:56:01.953Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-73423","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73423","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.660Z","epss":{"score":0.00182,"percentile":0.08174,"date":"2026-12-01T12:00:22.000Z"}}