{"id":"CVE-2026-44580","aliases":["GHSA-gx5p-jg67-6x7h"],"url":"https://o3.security/vulnerability/CVE-2026-44580","summary":"Next.js: Cross-site scripting in beforeInteractive scripts with untrusted input","details":"### Impact\n\nApplications that use `beforeInteractive` scripts together with untrusted content can be vulnerable to cross-site scripting. In affected versions, serialized script content was not escaped safely before being embedded into the document, which could allow attacker-controlled input to break out of the intended script context and execute arbitrary JavaScript in a visitor's browser.\n\n### Fix\n\nWe now HTML-escape serialized `beforeInteractive` script content before embedding it into the page, preventing attacker-controlled content from breaking out of the inline script boundary.\n\n### Workarounds\n\nIf you cannot upgrade immediately, do not pass untrusted data into `beforeInteractive` scripts. If that pattern is unavoidable, sanitize or escape the content before embedding it.","published":"2026-05-13T17:06:05.772Z","modified":"2026-08-12T03:51:36.230828285Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.00205,"percentile":0.10724,"asOf":"2026-08-14"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"next","fixedVersion":"15.5.16"},{"ecosystem":"npm","name":"next","fixedVersion":"16.2.5"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/44xxx/CVE-2026-44580.json"},{"type":"ADVISORY","url":"https://github.com/vercel/next.js/security/advisories/GHSA-gx5p-jg67-6x7h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44580"},{"type":"PACKAGE","url":"https://github.com/vercel/next.js"},{"type":"WEB","url":"https://github.com/vercel/next.js/releases/tag/v15.5.16"},{"type":"WEB","url":"https://github.com/vercel/next.js/releases/tag/v16.2.5"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:36.230828285Z"}}