Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script> in serialized function bodies
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
Serialize JavaScript serializes JavaScript values to a superset of JSON that includes regular expressions and functions. From 7.1.1 until 7.1.2, function values serialized by serialize-javascript are not fully protected against script-closing tags in attacker-influenced function source because SCRIPT_CLOSE_REGEXP can consume a second closing tag inside one match. When the serialized function is embedded in a script element, the surviving closing tag terminates the element early and causes the remaining output to be parsed as HTML, enabling cross-site scripting in the page origin. Only function values are affected; ordinary data values and options.isJSON output are unaffected. This issue is fixed in version 7.1.2.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| yahoo | serialize-javascript | 7.1.1 to before 7.1.2 | 7.1.2 | Patch available | CNA |
| — | serialize-javascript (npm) | 7.1.1 to before 7.1.2 | 7.1.2 | Patch available | GHSA-gfhx-hw2g-v5hg |
- serialize-javascript Vendoryahoo Affected 7.1.1 to before 7.1.2 Fixed in 7.1.2 Patch available CNA
- serialize-javascript (npm) Vendor— Affected 7.1.1 to before 7.1.2 Fixed in 7.1.2 Patch available GHSA-gfhx-hw2g-v5hg
Remediation
- Fix · CNA serialize-javascript (yahoo) Fixed in 7.1.2
- Fix · GHSA-gfhx-hw2g-v5hg serialize-javascript (npm) Fixed in 7.1.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 1 product
- Red Hat Hardened Images
Timeline
- 2026-10-02 Threatist record created from CVE-2026-97711
- 2026-10-03 Alias added: GHSA-gfhx-hw2g-v5hg
References
More yahoo vulnerabilities
- TI-2007-03044 Buffer overflow in the Yahoo! Webcam Upload ActiveX control in ywcupl.dll 2.0.1.4 for… CVSS 2.0HIGH 9.3
- TI-2026-62497 CMAK through 3.0.0.6 Cross-Site Request Forgery via Missing CSRF Filter CVSS 4.0HIGH 7.2
- TI-2007-04373 Buffer overflow in a certain ActiveX control in YVerInfo.dll before 2007.8.27.1 in the… CVSS 2.0HIGH 9.3
- TI-2026-41720 Elide 7.1.17 - Permission Bypass in Sort Expression Validation CVSS 4.0MEDIUM 5.3
- TI-2007-03904 Stack-based buffer overflow in the YDPCTL.YDPControl.1 (aka Yahoo! Installer Plugin for… CVSS 2.0HIGH 9.3
- TI-2007-03045 Buffer overflow in the Yahoo! Webcam Viewer ActiveX control in ywcvwr.dll 2.0.1.4 for… CVSS 2.0HIGH 9.3
Sources
- CVE-2026-97711 · CVE Program
- CVE-2026-97711 · NVD
- FIRST EPSS
- GHSA-gfhx-hw2g-v5hg · GitHub Advisory Database · CC BY 4.0
- CVE-2026-97711 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences