{"id":"CVE-2026-97711","published":"2026-09-29T16:00:33Z","modified":"2026-09-29T16:53:35Z","title":"Serialize JavaScript: Cross-site scripting (XSS) via unescaped </script> in serialized function bodies","vendor":"yahoo","product":"serialize-javascript","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00529,"percentile":0.38187,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-gfhx-hw2g-v5hg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534","tags":["x_refsource_MISC"]},{"url":"https://github.com/yahoo/serialize-javascript/releases/tag/v7.1.2","tags":["x_refsource_MISC"]}],"priority":{"score":9.2,"factors":[{"name":"EPSS percentile","points":7.64},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"yahoo","affectedVersions":[{"vendor":"yahoo","product":"serialize-javascript","versions":[">= 7.1.1, < 7.1.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-09-29T16:53:22.214214Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"serialize-javascript","vulnerableRanges":[">=7.1.1, <7.1.2"],"patched":["7.1.2"],"from":["GHSA-gfhx-hw2g-v5hg"],"provenance":"source"}],"summary":{"text":"The serialize-javascript library (yahoo) has a cross-site scripting flaw in versions from 7.1.1 up to 7.1.2, where function values are not fully escaped for script-closing tags, so a second closing tag can survive the regex replacement and break out of an embedding script element. An attacker who can influence the source of a serialized function can inject HTML and script into the page origin, but this requires user interaction (the victim must load the affected page), and only function values are affected, not ordinary data or options.isJSON output.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:18Z"},"euvd":{"id":"EUVD-2026-89027","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-red-hat-advanced-cluster-security-4-4-cve-2020-7660","parents":[{"from":"CVE-2020-7660","to":"CVE-2026-97711","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/yahoo/serialize-javascript/commit/f21a6fb3ace2353413761e79717b2d210ba6ccbd","https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534"],"basis":"shared function","functions":["serialize"]}]},{"from":"CVE-2024-11831","to":"CVE-2026-97711","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/yahoo/serialize-javascript/commit/f27d65d3de42affe2aac14607066c293891cec4e","https://github.com/yahoo/serialize-javascript/commit/7f3ac252d86b802454cb43782820aea2e0f6dc25","https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534"],"basis":"shared function","functions":["serialize"]}]}],"packageHistory":[{"cve":"CVE-2020-7660","published":"2020-06-01","fixed":"3.1.0","kev":false},{"cve":"CVE-2024-11831","published":"2025-02-10","fixed":"6.0.2","kev":false},{"cve":"CVE-2026-34043","published":"2026-03-31","fixed":"7.0.5","kev":false},{"cve":"CVE-2026-97711","published":"2026-09-29","fixed":"7.1.2","kev":false},{"cve":"CVE-2026-115897","published":"2026-10-23","fixed":"7.1.3","kev":false,"link":{"from":"CVE-2026-97711","to":"CVE-2026-115897","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:serialize-javascript","fromFixed":"7.1.2","toFixed":"7.1.3","daysApart":24},{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/yahoo/serialize-javascript/commit/2864b3c6260a3bfd52d2db3e70d1a079de108a61","https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534"],"basis":"shared file"},{"kind":"similar","provenance":"machine","score":0.21,"basis":"same product + CWE + description similarity"}]}}],"package":"npm:serialize-javascript"}}