{"answers":{"affected":"2 open source packages ship an affected version, including astro.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59727 exists.","fix":"Upgrade astro to 7.0.4 or later.","what":"CVE-2026-59727 is a low-severity cross-site scripting vulnerability in withastro astro, published on 27 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-59727 and fix it if it is affected.\n\nWhat it is: CVE-2026-59727 is a low-severity cross-site scripting vulnerability in withastro astro, published on 27 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59727 exists.\n\nAffected packages and fixed versions:\n- astro (npm): affected from 3.10.0; fixed in 7.0.4\n- astro (npm): affected from 3.10.0; fixed in 7.0.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-59727/ (Markdown: https://insights.sbomify.com/CVE-2026-59727/index.md)","id":"CVE-2026-59727","markdown":"https://insights.sbomify.com/CVE-2026-59727/index.md","name":"CVE-2026-59727","record":{"aliases":["GHSA-7pw4-f3q4-r2p2"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Astro web framework","requires_auth":"none","summary":"Attackers can inject arbitrary JavaScript via unescaped transition directives in Astro if developers pass untrusted input to them.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":2.1,"severity":"low","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-83","name":"Improper Neutralization of Script in Attributes in a Web Page"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"description":"Astro is a web framework for content-driven websites. In versions 3.10.0 through 7.0.3, 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 \u003castro-island\u003e 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). Exploitation 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 issue has been fixed in version 7.0.4.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands","id":"CVE-2026-59727","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"@astrojs/rss: XML Injection via Unescaped RSS Feed Fields","id":"CVE-2026-59728"},"packages":[{"ecosystem":"npm","fixed":["7.0.4"],"introduced":["3.10.0"],"last_affected":[],"package":"astro","purl":null,"source":"GHSA-7pw4-f3q4-r2p2"},{"ecosystem":"npm","fixed":["7.0.4"],"introduced":["3.10.0"],"last_affected":[],"package":"astro","purl":"pkg:npm/astro","source":"GHSA-7pw4-f3q4-r2p2"}],"prev":{"headline":"Ruflo: Unauthenticated RCE in MCP bridge default docker-compose deployment","id":"CVE-2026-59726"},"products":["astro"],"published":"2026-07-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-28","vendors":["withastro"]},"summary":"Attackers can inject arbitrary JavaScript via unescaped transition directives in Astro if developers pass untrusted input to them.","url":"https://insights.sbomify.com/CVE-2026-59727/"}