in serialized function bodies","description":"### Impact `serialize-javascript` escapes its output so it is safe to embed inside a `

Back to list

Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script> in serialized function bodies — GHSA-GFHX-HW2G-V5HG

GitHub · GitHub · GHSA-GFHX-HW2G-V5HG

ID
GHSA-GFHX-HW2G-V5HG
Date
Source
GitHub
Vendor
GitHub
Threat
low
CVSS
2.3

Summary

### Impact `serialize-javascript` escapes its output so it is safe to embed inside a `<script>` element. In 7.1.1 that guarantee does not hold for **function values**: a crafted function body can carry a literal, unescaped `</script>` into the output, terminating the script element early so the remainder is parsed as HTML. `SCRIPT_CLOSE_REGEXP` used `<\/script[^>]*>` as its first alternative. The character class…

Timeline

Published by source
2026-09-30

Risk context

  • Reported severity or threat level: low.
  • Reported CVSS score: 2.3 out of 10.
  • Review exposure for the affected product or family: npm: serialize-javascript.

Product

npm: serialize-javascript

What to do

General, cautious steps (verify details in the official source):

  • Review exposure and plan remediation based on risk and environment.
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Evidence and provenance

Canonical advisory ID
GHSA-GFHX-HW2G-V5HG
Source
GitHub
Vendor
GitHub
Published by source
2026-09-30
Last source activity
2026-09-30
Additional identifiers
CVE-2026-97711
Curated by
hlukh.ch

Related advisories and connections

These advisories are connected by shared CVE, product, vendor, source, or time signals.