GHSA-MPR7-6M5W-76RW
Vulnerability from github – Published: 2026-10-22 16:29 – Updated: 2026-10-22 16:29Summary
Astro's server-side View Transition CSS generator did not keep string animation properties within their generated CSS declarations. In an application that passes attacker-controlled data into an animation property such as duration, a value containing CSS delimiters could terminate the declaration and rule, then add attacker-selected CSS to the server-rendered page.
The injected content remains inside the generated <style> element. It cannot terminate that element or inject HTML or JavaScript because Astro escapes < before emitting the stylesheet.
Severity
Exploitation requires an application to pass untrusted, request-derived, or user-controlled content directly into a transition animation value. This is an uncommon application pattern, and applications using static or otherwise trusted transition values are unaffected.
The resulting capability is limited to CSS in the rendered document. The proof of concept does not demonstrate JavaScript execution, HTML injection, an origin-boundary bypass, or access to server-only data.
Details
Animation values are collected by stringifyAnimations() in packages/astro/src/runtime/server/transition.ts and passed to addAnimationProperty(). String values were converted directly with toString():
function addAnimationProperty(builder: AnimationBuilder, prop: string, value: string | number) {
let arr = builder[prop];
if (Array.isArray(arr)) {
arr.push(value.toString());
} else {
builder[prop] = [value.toString()];
}
}
The animation builder then interpolated each value into a declaration:
out += `\n\t${k}: ${value.join(', ')};`;
The completed stylesheet passes through escapeStyleText(), which escapes literal < characters to keep the content inside its HTML <style> element. CSS delimiters such as ;, {, and } remained active, allowing a value to escape its intended declaration and add another rule.
The shared serializer handles duration, delay, easing, direction, fillMode, and animation names, so custom transition objects using those string properties followed the same path.
The fix encodes CSS declaration delimiters while serializing each animation value. Supported CSS functions and strings, including calc() and var(), remain unchanged.
Proof of Concept
Using astro@7.3.2, create an on-demand rendered page:
---
import { fade } from "astro:transitions";
const duration = Astro.url.searchParams.get("duration") ?? "1ms";
---
<div id="target" transition:animate={fade({ duration })}>SAFE</div>
Request the page with:
/?duration=1ms%3B%7D%23target%7Bcolor%3Argb(1%2C2%2C3)%3Bfont-size%3A37px%7Dx%7Banimation-duration%3A1ms
Before the fix, the generated stylesheet contains an active rule equivalent to:
#target {
color: rgb(1, 2, 3);
font-size: 37px;
}
In Chromium, the target's computed styles change to rgb(1, 2, 3) and 37px. This behavior is reproducible in a production standalone SSR build, not only in the development server.
Impact
An attacker can inject CSS into the affected application's rendered page when the application places attacker-controlled data into a transition animation value. The CSS can restyle or conceal content, reposition existing controls, add generated text, or otherwise misrepresent the page's UI.
CSS selectors and conditional resource loads may expose data already present in selectable DOM attributes in some applications, depending on the page and its Content Security Policy. The issue does not expose cookies, server-only values, arbitrary DOM text, or cross-origin response data by itself.
Affected Versions
astro >= 7.1.0, <= 7.3.2.
Versions through 7.0.9 are covered by GHSA-4g3v-8h47-v7g6 / CVE-2026-73422, which had the stronger impact of escaping the <style> element and injecting HTML or JavaScript.
Patched Versions
This issue is patched in astro@7.3.3. Fix: https://github.com/withastro/astro/pull/17970
Workarounds
Do not pass untrusted or request-derived values into View Transition animation properties. If dynamic values are required, validate them according to the expected CSS grammar before constructing the transition. For duration and delay, prefer finite numbers or strictly validated CSS time values.
Credits
Reported by @avrlab233.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 7.3.2"
},
"package": {
"ecosystem": "npm",
"name": "astro"
},
"ranges": [
{
"events": [
{
"introduced": "7.1.0"
},
{
"fixed": "7.3.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-114127"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-22T16:29:28Z",
"nvd_published_at": "2026-10-21T18:17:25Z",
"severity": "LOW"
},
"details": "### Summary\n\nAstro\u0027s server-side View Transition CSS generator did not keep string animation properties within their generated CSS declarations. In an application that passes attacker-controlled data into an animation property such as `duration`, a value containing CSS delimiters could terminate the declaration and rule, then add attacker-selected CSS to the server-rendered page.\n\nThe injected content remains inside the generated `\u003cstyle\u003e` element. It cannot terminate that element or inject HTML or JavaScript because Astro escapes `\u003c` before emitting the stylesheet.\n\n### Severity\n\nExploitation requires an application to pass untrusted, request-derived, or user-controlled content directly into a transition animation value. This is an uncommon application pattern, and applications using static or otherwise trusted transition values are unaffected.\n\nThe resulting capability is limited to CSS in the rendered document. The proof of concept does not demonstrate JavaScript execution, HTML injection, an origin-boundary bypass, or access to server-only data.\n\n### Details\n\nAnimation values are collected by `stringifyAnimations()` in `packages/astro/src/runtime/server/transition.ts` and passed to `addAnimationProperty()`. String values were converted directly with `toString()`:\n\n```ts\nfunction addAnimationProperty(builder: AnimationBuilder, prop: string, value: string | number) {\n let arr = builder[prop];\n if (Array.isArray(arr)) {\n arr.push(value.toString());\n } else {\n builder[prop] = [value.toString()];\n }\n}\n```\n\nThe animation builder then interpolated each value into a declaration:\n\n```ts\nout += `\\n\\t${k}: ${value.join(\u0027, \u0027)};`;\n```\n\nThe completed stylesheet passes through `escapeStyleText()`, which escapes literal `\u003c` characters to keep the content inside its HTML `\u003cstyle\u003e` element. CSS delimiters such as `;`, `{`, and `}` remained active, allowing a value to escape its intended declaration and add another rule.\n\nThe shared serializer handles `duration`, `delay`, `easing`, `direction`, `fillMode`, and animation names, so custom transition objects using those string properties followed the same path.\n\nThe fix encodes CSS declaration delimiters while serializing each animation value. Supported CSS functions and strings, including `calc()` and `var()`, remain unchanged.\n\n### Proof of Concept\n\nUsing `astro@7.3.2`, create an on-demand rendered page:\n\n```astro\n---\nimport { fade } from \"astro:transitions\";\nconst duration = Astro.url.searchParams.get(\"duration\") ?? \"1ms\";\n---\n\u003cdiv id=\"target\" transition:animate={fade({ duration })}\u003eSAFE\u003c/div\u003e\n```\n\nRequest the page with:\n\n```text\n/?duration=1ms%3B%7D%23target%7Bcolor%3Argb(1%2C2%2C3)%3Bfont-size%3A37px%7Dx%7Banimation-duration%3A1ms\n```\n\nBefore the fix, the generated stylesheet contains an active rule equivalent to:\n\n```css\n#target {\n color: rgb(1, 2, 3);\n font-size: 37px;\n}\n```\n\nIn Chromium, the target\u0027s computed styles change to `rgb(1, 2, 3)` and `37px`. This behavior is reproducible in a production standalone SSR build, not only in the development server.\n\n### Impact\n\nAn attacker can inject CSS into the affected application\u0027s rendered page when the application places attacker-controlled data into a transition animation value. The CSS can restyle or conceal content, reposition existing controls, add generated text, or otherwise misrepresent the page\u0027s UI.\n\nCSS selectors and conditional resource loads may expose data already present in selectable DOM attributes in some applications, depending on the page and its Content Security Policy. The issue does not expose cookies, server-only values, arbitrary DOM text, or cross-origin response data by itself.\n\n### Affected Versions\n\n`astro \u003e= 7.1.0, \u003c= 7.3.2`.\n\nVersions through 7.0.9 are covered by GHSA-4g3v-8h47-v7g6 / CVE-2026-73422, which had the stronger impact of escaping the `\u003cstyle\u003e` element and injecting HTML or JavaScript.\n\n### Patched Versions\n\nThis issue is patched in `astro@7.3.3`. Fix: https://github.com/withastro/astro/pull/17970\n\n### Workarounds\n\nDo not pass untrusted or request-derived values into View Transition animation properties. If dynamic values are required, validate them according to the expected CSS grammar before constructing the transition. For `duration` and `delay`, prefer finite numbers or strictly validated CSS time values.\n\n### Credits\n\nReported by @avrlab233.",
"id": "GHSA-mpr7-6m5w-76rw",
"modified": "2026-10-22T16:29:28Z",
"published": "2026-10-22T16:29:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/withastro/astro/security/advisories/GHSA-mpr7-6m5w-76rw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114127"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/pull/17970"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/commit/0b4dc3a211910b589d3805ab4dfedf11b0e712bb"
},
{
"type": "PACKAGE",
"url": "https://github.com/withastro/astro"
},
{
"type": "WEB",
"url": "https://github.com/withastro/astro/releases/tag/astro@7.3.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Astro: Arbitrary CSS injection in Astro View Transitions"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.