{
  "id": "security/javascript/cheeriojs__dom-serializer/2026-10-05-deeply-nested-documents-overflow-serialization",
  "title": "Deeply nested documents overflow the call stack during serialization",
  "category": "security",
  "type": "dos",
  "severity": "medium",
  "cvss": {
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
    "score": 5.3
  },
  "ecosystem": "javascript",
  "project": {
    "owner": "cheeriojs",
    "repo": "dom-serializer",
    "url": "https://github.com/cheeriojs/dom-serializer"
  },
  "affected_versions": [
    "dom-serializer <= 3.1.1"
  ],
  "fixed_version": "3.1.2",
  "status": "published",
  "disclosure": {
    "channel": "pvr",
    "ghsa_id": "GHSA-w993-rw2g-cjqj",
    "cve_id": null,
    "url": "https://github.com/cheeriojs/dom-serializer/security/advisories/GHSA-w993-rw2g-cjqj",
    "reported_at": "2026-10-05T14:40:15+03:00",
    "published_at": "2026-12-03T14:30:59+03:00"
  },
  "summary": "Applications that serialize untrusted documents with dom-serializer's render() are affected (CWE-674). render() recursed once per level of the DOM tree, so a deeply nested HTML or XML document that parses successfully exhausts the JavaScript call stack during serialization and makes render() throw a RangeError. npm package dom-serializer versions <= 3.1.1 are affected, from 0.0.0 through 3.1.1. Fixed in 3.1.2. GitHub rates it medium, with CVSS 3.1 score 5.3. The advisory credits lenny-ts, Linus-Shyu and ucsurf as reporters. Fixed by Felix Boehm (@fb55).",
  "discovered_at": "2026-10-04T00:00:00+03:00",
  "public": true,
  "credit": "ucsurf",
  "updated_at": "2026-12-03T14:30:59+03:00",
  "pr": null,
  "references": [
    "https://github.com/cheeriojs/dom-serializer/pull/1744",
    "https://github.com/cheeriojs/dom-serializer/releases/tag/v3.1.2",
    "https://www.npmjs.com/package/dom-serializer/v/3.1.2"
  ]
}
