5.1medium
Astro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered
- Severity
- 5.1medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8mv7-9c27-98vc
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| withastro astro | >= 7.0.0, < 7.0.6 | CVE List |
| astro (npm) | from 7.0.0 before 7.0.6 | GitHub Advisory Database |
All scores
| GitHub_M | 5.1medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
In 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.
Details
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:
- Mounting
actions()beforemiddleware()allows cross-origin form-encoded action requests to execute before the gate runs. Theexamples/advanced-routingexample and the Cloudflarehonodocs shipped this order. - Omitting
middleware()entirely (reasonable for apps with no custom middleware) silently dropscheckOriginprotection for all on-demand endpoints and pages dispatched throughpages().
The 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.
Affected versions
Astro >= 7.0.0 when using the composable astro/hono pipeline with either:
actions()mounted beforemiddleware(), orpages()used withoutmiddleware()
The default (non-composable) pipeline is not affected.
Fix
The 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.
Fix: https://github.com/withastro/astro/pull/17250
Workaround
Ensure 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:
app.use(middleware());
app.use(actions());
app.use(pages());
NVD (es)
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-73423 changed 2026-08-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8mv7-9c27-98vc changed 2026-08-12 | CC-BY-4.0 |
| NVD | CVE-2026-73423 changed 2026-10-24 | Public domain |