From 01ce0b389a1c6391724597e46183a1c838578e2c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 17 Nov 2026 08:32:28 +0000 Subject: [PATCH] fix(deps): update dependencies (#649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.42.8` → `0.42.10`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.42.8/0.42.10) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fstarlight/0.42.10?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fstarlight/0.42.8/0.42.10?slim=true) | | [@astrojs/starlight-docsearch](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/docsearch)) | [`0.8.0` → `0.8.1`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight-docsearch/0.8.0/0.8.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fstarlight-docsearch/0.8.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fstarlight-docsearch/0.8.0/0.8.1?slim=true) | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.4.5` → `7.4.7`](https://renovatebot.com/diffs/npm/astro/7.4.5/7.4.7) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/7.4.7?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/7.4.5/7.4.7?slim=true) | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`^7.0.2` → `^7.4.7`](https://renovatebot.com/diffs/npm/astro/7.0.2/7.4.7) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/7.4.7?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/7.0.2/7.4.7?slim=true) | | [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm/npm/pnpm)) | [`12.17.0` → `12.20.0`](https://renovatebot.com/diffs/npm/pnpm/12.17.0/12.20.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/12.20.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/12.17.0/12.20.0?slim=true) | | [starlight-openapi](https://github.com/HiDeoo/starlight-openapi) ([source](https://github.com/HiDeoo/starlight-openapi/tree/HEAD/packages/starlight-openapi)) | [`0.27.0` → `0.27.1`](https://renovatebot.com/diffs/npm/starlight-openapi/0.27.0/0.27.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/starlight-openapi/0.27.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/starlight-openapi/0.27.0/0.27.1?slim=true) | --- ### Astro: Image endpoint in @​astrojs/node can read files from a case-variant sibling of the output directory on case-sensitive filesystems [CVE-2026-126364](https://nvd.nist.gov/vuln/detail/CVE-2026-126364) / [GHSA-r3h5-4585-7x3w](https://github.com/advisories/GHSA-r3h5-4585-7x3w)
More information #### Details ##### Summary The `/_image` endpoint used by the `@astrojs/node` adapter checks that a requested local image is inside the build output directory before reading it from disk. That check compared paths case-insensitively. On case-sensitive filesystems (such as Linux), a directory whose path differs from the output directory only by letter case is a different directory, but it passed the check. For example, with the client output directory at `/srv/app/dist/client/`, a request such as: ```text /_image?href=/../../DIST/client/secret.png&w=32&f=png ``` resolved to `/srv/app/DIST/client/secret.png` and was served, even though that file is outside the output directory. ##### Impact An unauthenticated attacker can read image files from outside the output directory, but only when all of the following are true: - The site uses on-demand rendering with the `@astrojs/node` adapter. - The server runs on a case-sensitive filesystem. - A directory exists whose path matches the output directory except for letter case (for example `DIST/client` next to `dist/client`). Such a layout is unusual, and the attacker cannot create it. Only files the image service accepts can be read. Raster images are returned after resizing; SVG files are returned unchanged. Other file types fail during processing. Plain path traversal outside the output directory (for example `/../../secret.png`) was already rejected and is not affected. ##### Affected versions `astro` >= 5.14.3, <= 7.4.6, when used with `@astrojs/node` (all versions up to 11.1.11). The vulnerable image endpoint is provided by `astro` and used by the `@astrojs/node` adapter. ##### Patches Fixed in `astro` 7.4.7. The path check now compares paths exactly, and only ignores letter case for Windows drive-letter paths. The fix ships in `astro`, so upgrading `@astrojs/node` alone is not enough. ##### Workarounds Upgrade to `astro` 7.4.7 or later. Before upgrading, make sure no directory next to the build output directory has a path that differs from it only by letter case. ##### Credits Reported by @​zachariah-mithani. #### Severity - CVSS Score: 6.3 / 10 (Medium) - Vector String: `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N` #### References - [https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w](https://github.com/withastro/astro/security/advisories/GHSA-r3h5-4585-7x3w) - [https://nvd.nist.gov/vuln/detail/CVE-2026-126364](https://nvd.nist.gov/vuln/detail/CVE-2026-126364) - [https://github.com/withastro/astro/commit/7da442bb286e0c29e1c9e1add6727b7cbf434f1a](https://github.com/withastro/astro/commit/7da442bb286e0c29e1c9e1add6727b7cbf434f1a) - [https://github.com/withastro/astro](https://github.com/withastro/astro) - [https://github.com/withastro/astro/releases/tag/astro@7.4.7](https://github.com/withastro/astro/releases/tag/astro@7.4.7) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-r3h5-4585-7x3w) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)).
--- ### Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands [CVE-2026-59727](https://nvd.nist.gov/vuln/detail/CVE-2026-59727) / [GHSA-7pw4-f3q4-r2p2](https://github.com/advisories/GHSA-7pw4-f3q4-r2p2)
More information #### Details ##### Summary When a `transition:persist`, `transition:scope`, or `transition:persist-props` directive is applied to a client-hydrated (`client:*`) component, Astro copied the directive value onto the rendered `` element **without HTML-escaping it**. If a developer reflects attacker-controlled input into one of these directives, an attacker can break out of the attribute and inject arbitrary HTML/JavaScript into the server-rendered output, resulting in reflected cross-site scripting (XSS). ##### Severity Although a generic reflected XSS scores in the Medium range, exploitation here requires the application developer to have written a non-idiomatic pattern — passing untrusted, request-derived input directly into a transition directive. Astro applications that do not route untrusted input into these directives are unaffected. This mitigating precondition places the real-world severity at Low. ##### Details In `generateHydrateScript()` (`packages/astro/src/runtime/server/hydration.ts`), every island property is HTML-escaped before serialization — the `attrs`, `props`, and `opts` assignments all pass through `escapeHTML()`. The transition directives, however, were copied verbatim: ```ts transitionDirectivesToCopyOnIsland.forEach((name) => { if (typeof props[name] !== 'undefined') { island.props[name] = props[name]; // not escaped } }); ``` The `` element is serialized via `renderElement('astro-island', island, false)` with `shouldEscape=false`, and `toAttributeString()` returns the value unchanged in that mode. As a result there is no downstream re-escaping, and the raw directive value reaches the HTML response. This is the same output sink previously addressed for slot names in GHSA-8hv8-536x-4wqp. The affected directives are: - `data-astro-transition-scope` (`transition:scope`) - `data-astro-transition-persist` (`transition:persist`) - `data-astro-transition-persist-props` (`transition:persist-props`) Note that `transition:persist` is typed `boolean | string`, so passing a string value is a supported use of the API. ##### Proof of Concept A component that reflects a query parameter into a transition directive: ```astro --- const persist = Astro.url.searchParams.get('persist') ?? 'default'; --- ``` Request: ``` https://example.com/?persist="> ``` Rendered output (before the fix): ```html > ``` The `"` closes the attribute and the injected `` executes in the victim's browser. ##### Impact Reflected XSS. An attacker who can induce a victim to visit a crafted URL can execute arbitrary script in the victim's session on the origin, subject to the requirement that the target application reflects untrusted input into one of the affected transition directives. ##### Affected Versions `astro >= 3.10.0, < 7.0.4` (introduced in 3.10.0, PR #​7861). ##### Patched Versions `astro >= 7.0.4`. Fixed in PR #​17212 by HTML-escaping transition directive values before they are rendered onto the island element. ##### Workarounds Do not pass untrusted or request-derived input into `transition:persist`, `transition:scope`, or `transition:persist-props`. If such input is required, HTML-escape or strictly validate it before passing it to the directive. Upgrading to `astro@7.0.4` or later removes the need for manual mitigation. ##### Credits Reported by @​jlgore. #### Severity - CVSS Score: 2.1 / 10 (Low) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N` #### References - [https://github.com/withastro/astro/security/advisories/GHSA-7pw4-f3q4-r2p2](https://github.com/withastro/astro/security/advisories/GHSA-7pw4-f3q4-r2p2) - [https://nvd.nist.gov/vuln/detail/CVE-2026-59727](https://nvd.nist.gov/vuln/detail/CVE-2026-59727) - [https://github.com/withastro/astro/pull/17212](https://github.com/withastro/astro/pull/17212) - [https://github.com/withastro/astro/commit/7ba0bb1dc7516e88caff9abd7767322af44b0294](https://github.com/withastro/astro/commit/7ba0bb1dc7516e88caff9abd7767322af44b0294) - [https://github.com/withastro/astro](https://github.com/withastro/astro) - [https://github.com/withastro/astro/releases/tag/astro@7.0.4](https://github.com/withastro/astro/releases/tag/astro@7.0.4) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-7pw4-f3q4-r2p2) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)).
--- ### Astro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered [CVE-2026-73423](https://nvd.nist.gov/vuln/detail/CVE-2026-73423) / [GHSA-8mv7-9c27-98vc](https://github.com/advisories/GHSA-8mv7-9c27-98vc)
More information #### Details ##### 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()` 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. - Omitting `middleware()` entirely (reasonable for apps with no custom middleware) silently drops `checkOrigin` protection for all on-demand endpoints and pages dispatched through `pages()`. 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 before `middleware()`, or - `pages()` used without `middleware()` 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: ```ts app.use(middleware()); app.use(actions()); app.use(pages()); ``` #### Severity - CVSS Score: 5.1 / 10 (Medium) - Vector String: `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` #### References - [https://github.com/withastro/astro/security/advisories/GHSA-8mv7-9c27-98vc](https://github.com/withastro/astro/security/advisories/GHSA-8mv7-9c27-98vc) - [https://github.com/withastro/astro/pull/17250](https://github.com/withastro/astro/pull/17250) - [https://github.com/withastro/astro/commit/0b30b35f864310bee8485c952d1877e82e2b9b1a](https://github.com/withastro/astro/commit/0b30b35f864310bee8485c952d1877e82e2b9b1a) - [https://github.com/withastro/astro](https://github.com/withastro/astro) - [https://github.com/withastro/astro/releases/tag/astro@7.0.6](https://github.com/withastro/astro/releases/tag/astro@7.0.6) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-8mv7-9c27-98vc) and the [GitHub Advisory Database](https://github.com/github/advisory-database) ([CC-BY 4.0](https://github.com/github/advisory-database/blob/main/LICENSE.md)).
--- ### Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298) [CVE-2026-59729](https://nvd.nist.gov/vuln/detail/CVE-2026-59729) / [GHSA-f48w-9m4c-m7f5](https://github.com/advisories/GHSA-f48w-9m4c-m7f5)
More information #### Details ##### Summary The fix for CVE-2026-54298 (GHSA-jrpj-wcv7-9fh9) added an `INVALID_ATTR_NAME_CHAR` guard to `addAttribute()` so that spread-prop attribute names containing `"' >/=` or whitespace are dropped. A second attribute-rendering path, `renderHTMLElement()` in `packages/astro/src/runtime/server/render/dom.ts`, has its own inline attribute loop that does not go through `addAttribute()` and was not updated. It interpolates the attribute name unescaped and only escapes the value, so untrusted prop keys spread onto a native-`HTMLElement`-subclass component can still break out of the attribute context, resulting in XSS. ##### Details `renderHTMLElement` builds attributes directly: ```js for (const attr in props) { attrHTML += ` ${attr}="${toAttributeString(await props[attr])}"`; } ``` The attribute name (`attr`) is interpolated raw; only the value is escaped via `toAttributeString`. By contrast, the hardened `addAttribute` in `util.ts` rejects invalid names: ```js if (INVALID_ATTR_NAME_CHAR.test(key)) { return ''; } // /[\s"'>/=]/ ``` `renderHTMLElement` is reached from `component.ts` when the component is a native `HTMLElement` subclass: ```js if (!renderer && typeof HTMLElement === 'function' && componentIsHTMLElement(Component)) { const output = await renderHTMLElement(result, Component, _props, slots); } ``` where `_props` carries spread props verbatim. ##### Reachability The branch only runs when `typeof HTMLElement === 'function'` at SSR time. In default Node SSR `HTMLElement` is `undefined`, so the branch is dead. It becomes reachable when the SSR runtime exposes a global `HTMLElement` (Deno, Bun with a DOM shim, or jsdom/happy-dom in Node) **and** a class extending `HTMLElement` is used directly as an Astro component that receives untrusted-keyed spread props. ##### Proof of Concept Given malicious spread props: ```js const maliciousProps = { 'onmouseover=alert(document.domain) x': 'y', 'x>': 'z', }; ``` - `addAttribute` (post-fix) → `` (key stripped — safe) - `renderHTMLElement` → `="z">` (handler + ``, an attacker-controlled value containing `` or `` could terminate the element and inject arbitrary HTML and JavaScript. Other JSX expression contexts escaped dynamic strings automatically. This behavior was limited to `` passed to `` was emitted without escaping. The browser interpreted the first closing tag as markup and executed the injected script. The fix preserves raw rendering for literal script and style content while escaping dynamic string children like other JSX expression values. ##### Impact Affected applications could be vulnerable to reflected or stored cross-site scripting. Exploitation required an application to pass attacker-controlled data directly as a dynamic child of a `