{
  "id": "security/javascript/fb55__domutils/2026-10-05-findone-existsone-stack-overflow",
  "title": "Deeply nested documents overflow the call stack in findOne(), existsOne() and getElementById()",
  "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": "fb55",
    "repo": "domutils",
    "url": "https://github.com/fb55/domutils"
  },
  "affected_versions": [
    "domutils >= 1.0.0, <= 4.0.2"
  ],
  "fixed_version": "4.1.0",
  "status": "published",
  "disclosure": {
    "channel": "pvr",
    "ghsa_id": "GHSA-5pwf-qwq7-cwxj",
    "cve_id": null,
    "url": "https://github.com/fb55/domutils/security/advisories/GHSA-5pwf-qwq7-cwxj",
    "reported_at": "2026-10-05T14:40:15+03:00",
    "published_at": "2026-12-03T14:53:29+03:00"
  },
  "summary": "Applications that search untrusted HTML or XML documents with domutils' findOne(), existsOne() or getElementById() are affected (CWE-674). These functions recursed once per level of the document, so a deeply nested document exhausts the JavaScript call stack and makes them throw a RangeError. npm package domutils versions >= 1.0.0 and <= 4.0.2 are affected: getElementById() from 1.0.0, findOne() from 1.1.3 and existsOne() from 1.4.0. Fixed in 4.1.0. GitHub rates it medium, with CVSS 3.1 score 5.3. The advisory credits ucsurf as reporter. Fixed by Felix Boehm (@fb55).",
  "discovered_at": "2026-10-04T00:00:00+03:00",
  "public": true,
  "credit": "ucsurf",
  "updated_at": "2026-12-03T14:53:29+03:00",
  "pr": null,
  "references": [
    "https://github.com/fb55/domutils/pull/2406",
    "https://github.com/fb55/domutils/releases/tag/v4.1.0",
    "https://www.npmjs.com/package/domutils/v/4.1.0"
  ]
}
