node-serialize-javascript — security advisory
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.
- Products
- node-serialize-javascript
- Affected versions
- 5.0.1-2, 6.0.0-1, 6.0.1-1, 6.0.2-1, 7.0.4+~5.0.4-1, 7.0.5+~5.0.4-1, 7.0.7+~5.0.4-1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-97711
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 03:35 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2026-97711
node-serialize-javascript
Fixed versions: Not specified
node-serialize-javascript
Fixed versions: Not specified
node-serialize-javascript
Fixed versions: Not specified
node-serialize-javascript
Fixed versions: Not specified
Complete source record
{
"id": "86936f4dc1cfb42bb1068171f6069b5db35f3b9692b140f53d79db5e80c84cd2",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-97711",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-97711",
"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.",
"evidence": "osv:UBUNTU-CVE-2026-97711",
"products": [
{
"name": {
"value": "node-serialize-javascript",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "5.0.1-2",
"evidence": "/affected/0/versions"
},
{
"value": "6.0.0-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "node-serialize-javascript",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.0.1-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "node-serialize-javascript",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "7.0.4+~5.0.4-1",
"evidence": "/affected/2/versions"
},
{
"value": "7.0.5+~5.0.4-1",
"evidence": "/affected/2/versions"
},
{
"value": "7.0.7+~5.0.4-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "node-serialize-javascript",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "6.0.2-1",
"evidence": "/affected/3/versions"
},
{
"value": "7.0.4+~5.0.4-1",
"evidence": "/affected/3/versions"
}
]
}
],
"severity": "low",
"structured": {
"id": "UBUNTU-CVE-2026-97711",
"aliases": [
"UBUNTU-CVE-2026-97711"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-serialize-javascript",
"purl": "pkg:deb/ubuntu/node-serialize-javascript?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"5.0.1-2",
"6.0.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-97711.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-serialize-javascript",
"binary_version": "6.0.0-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-serialize-javascript",
"purl": "pkg:deb/ubuntu/node-serialize-javascript?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"6.0.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-97711.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-serialize-javascript",
"binary_version": "6.0.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-serialize-javascript",
"purl": "pkg:deb/ubuntu/node-serialize-javascript?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"7.0.4+~5.0.4-1",
"7.0.5+~5.0.4-1",
"7.0.7+~5.0.4-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-97711.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-serialize-javascript",
"binary_version": "7.0.7+~5.0.4-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-serialize-javascript",
"purl": "pkg:deb/ubuntu/node-serialize-javascript?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"6.0.2-1",
"7.0.4+~5.0.4-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-97711.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-serialize-javascript",
"binary_version": "7.0.4+~5.0.4-1"
}
]
}
}
],
"modified": "2026-10-17T13:01:20.148997901Z",
"provider": "osv",
"upstream": [
"CVE-2026-97711"
],
"references": [
"https://ubuntu.com/security/CVE-2026-97711",
"https://www.cve.org/CVERecord?id=CVE-2026-97711",
"https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-gfhx-hw2g-v5hg",
"https://github.com/yahoo/serialize-javascript/commit/2bdbaaff9cb8a4639135eb24cfcd383d3fefb534",
"https://github.com/yahoo/serialize-javascript/releases/tag/v7.1.2"
]
},
"related_cves": [
{
"value": "CVE-2026-97711",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 361742,
"published_at": "2026-09-29T16:17:00+00:00"
}