{"id":"CVE-2026-113650","aliases":["DHI-qiev-3447-qi4g-cgmv","GHSA-c9rx-x947-fp3h"],"summary":"ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)","published_at":"2026-10-20T16:19:12.1Z","modified_at":"2026-11-16T02:36:07.205116Z","products":[{"slug":"rhel","name":"Red Hat Enterprise Linux","category":"red-hat"}],"rating":{"severity":"medium","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.004800000227987766,"percentile":0.42177000641822815,"date":"2026-11-19T00:00:00Z"},"priority":7.3,"details":"ApostropheCMS is an open-source Node.js content management system. In sanitize-html 2.18.0, when an <iframe> is not allowed and disallowedTagsMode is 'discard' (the defaults), its raw-text content is re-sanitized by a recursive call to sanitizeHtml(text, options). The recursion has no bound and starts each nested call with a fresh state. This vulnerability is fixed in 2.18.1.","affected_stack":[{"ecosystem":"Red Hat:enterprise_linux:10","package":"cockpit-image-builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-113650","relation":"self"},{"ecosystem":"Red Hat:hummingbird:1","package":"prometheus3.5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-113650","relation":"self"}],"affected_other":[{"ecosystem":"CVE","package":"apostrophecms/apostrophe","versions":["< 4.34.0"],"provider":"cvelistv5","source":"CVE-2026-113650","relation":"self"},{"ecosystem":"CVE","package":"apostrophecms/sanitize-html","versions":[">= 2.18.0, < 2.18.1"],"provider":"cvelistv5","source":"CVE-2026-113650","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15","purl":"pkg:apk/dhi/prometheus-3.15","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-dev","purl":"pkg:apk/dhi/prometheus-3.15-dev","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-fips","purl":"pkg:apk/dhi/prometheus-3.15-fips","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-fips-dev","purl":"pkg:apk/dhi/prometheus-3.15-fips-dev","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5","purl":"pkg:apk/dhi/prometheus-3.5","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-dev","purl":"pkg:apk/dhi/prometheus-3.5-dev","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-fips","purl":"pkg:apk/dhi/prometheus-3.5-fips","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-fips-dev","purl":"pkg:apk/dhi/prometheus-3.5-fips-dev","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"npm","package":"sanitize-html","purl":"pkg:npm/sanitize-html","ranges":[{"type":"SEMVER","events":[{"introduced":"2.18.0"},{"fixed":"2.18.1"}]}],"fixed":["2.18.1"],"provider":"osv","source":"GHSA-c9rx-x947-fp3h","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Cost Management On Premise","cpe":"cpe:/a:redhat:cost_management_on_premise:1","status":"affected","packages":["costmanagement/costmanagement-ui-rhel10"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Multicluster Engine for Kubernetes","cpe":"cpe:/a:redhat:multicluster_engine","status":"affected","packages":["multicluster-engine/console-mce-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"affected","packages":["rhacm2/console-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","cpe":"cpe:/a:redhat:enterprise_linux:10","status":"affected","packages":["cockpit-image-builder"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Hardened Images","cpe":"cpe:/a:redhat:hummingbird:1","status":"affected","packages":["prometheus3.5"],"package_count":1,"fixed":[],"advisories":[],"note":"Will not fix","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Hardened Images","cpe":"cpe:/a:redhat:hummingbird:1","status":"not_affected","packages":["prometheus3.13"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"affected","packages":["rhoai/odh-mlflow-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"affected","packages":["openshift4/ose-agent-installer-ui-rhel9","openshift4/ose-console","openshift4/ose-console-rhel9"],"package_count":3,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 5","cpe":"cpe:/a:redhat:openshift:5","status":"affected","packages":["openshift5/ose-agent-installer-ui-rhel9","openshift5/ose-console-rhel9"],"package_count":2,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/dashboard-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Quay 3","cpe":"cpe:/a:redhat:quay:3","status":"affected","packages":["quay/quay-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Out of support scope","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Quay 3","cpe":"cpe:/a:redhat:quay:3","status":"affected","packages":["quay/quay-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Satellite 6","cpe":"cpe:/a:redhat:satellite:6","status":"affected","packages":["satellite/iop-advisor-frontend-rhel9","satellite/iop-host-inventory-frontend-rhel9","satellite/iop-vulnerability-frontend-rhel9"],"package_count":3,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2026-113650","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-113650","license":"CC-BY-4.0","published_at":"2026-10-20T16:19:12.1Z","modified_at":"2026-10-28T14:02:38.5Z","summary":"ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)","details":"ApostropheCMS is an open-source Node.js content management system. In sanitize-html 2.18.0, when an <iframe> is not allowed and disallowedTagsMode is 'discard' (the defaults), its raw-text content is re-sanitized by a recursive call to sanitizeHtml(text, options). The recursion has no bound and starts each nested call with a fresh state. This vulnerability is fixed in 2.18.1.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"CVE-2026-113650"}],"affected":[{"ecosystem":"CVE","package":"apostrophecms/apostrophe","versions":["< 4.34.0"],"provider":"cvelistv5","source":"CVE-2026-113650","relation":"self"},{"ecosystem":"CVE","package":"apostrophecms/sanitize-html","versions":[">= 2.18.0, < 2.18.1"],"provider":"cvelistv5","source":"CVE-2026-113650","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1"}]},{"provider":"osv","source_id":"DHI-qiev-3447-qi4g-cgmv","relation":"self","url":"https://osv.dev/vulnerability/DHI-qiev-3447-qi4g-cgmv","license":"Apache-2.0","published_at":"2026-11-14T00:36:35Z","modified_at":"2026-11-16T02:36:07.205116Z","summary":"ApostropheCMS is an open-source Node.js content management system. In sanitize-html 2.18.0, when an <iframe> is not…","details":"ApostropheCMS is an open-source Node.js content management system. In sanitize-html 2.18.0, when an <iframe> is not allowed and disallowedTagsMode is 'discard' (the defaults), its raw-text content is re-sanitized by a recursive call to sanitizeHtml(text, options). The recursion has no bound and starts each nested call with a fresh state. This vulnerability is fixed in 2.18.1.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"DHI-qiev-3447-qi4g-cgmv"}],"affected":[{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15","purl":"pkg:apk/dhi/prometheus-3.15","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-dev","purl":"pkg:apk/dhi/prometheus-3.15-dev","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-fips","purl":"pkg:apk/dhi/prometheus-3.15-fips","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.15-fips-dev","purl":"pkg:apk/dhi/prometheus-3.15-fips-dev","versions":["3.15.0-r0","3.15.0-r1","3.15.0-r2","3.15.0-r3","3.15.0-r4","3.15.0-r5","3.15.0-r6","3.15.1-r0","3.15.1-r1","3.15.1-r2","3.15.1-r3","3.15.1-r4","3.15.1-r5","3.15.1-r6"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5","purl":"pkg:apk/dhi/prometheus-3.5","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-dev","purl":"pkg:apk/dhi/prometheus-3.5-dev","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-fips","purl":"pkg:apk/dhi/prometheus-3.5-fips","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"},{"ecosystem":"Docker Hardened Images:Alpine:3.24","package":"prometheus-3.5-fips-dev","purl":"pkg:apk/dhi/prometheus-3.5-fips-dev","versions":["3.5.5-r1","3.5.5-r10","3.5.5-r11","3.5.5-r12","3.5.5-r13","3.5.5-r14","3.5.5-r15","3.5.5-r16","3.5.5-r17","3.5.5-r18","3.5.5-r19","3.5.5-r2","3.5.5-r20","3.5.5-r21","3.5.5-r22","3.5.5-r23","3.5.5-r24","3.5.5-r25","3.5.5-r26","3.5.5-r3","3.5.5-r4","3.5.5-r5","3.5.5-r9"],"provider":"osv","source":"DHI-qiev-3447-qi4g-cgmv","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-qiev-3447-qi4g-cgmv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113650"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-c9rx-x947-fp3h"},{"type":"ADVISORY","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h"},{"type":"FIX","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"},{"type":"FIX","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-113650"},{"type":"FIX","url":"https://www.cve.org/CVERecord?id=CVE-2026-113650"}]},{"provider":"osv","source_id":"GHSA-c9rx-x947-fp3h","relation":"self","url":"https://osv.dev/vulnerability/GHSA-c9rx-x947-fp3h","license":"CC-BY-4.0","published_at":"2026-10-21T17:05:01Z","modified_at":"2026-10-21T17:15:08.634885Z","summary":"ApostropheCMS sanitize-html: unbounded recursion when re-sanitizing the fallback of a discarded iframe (stack overflow, nestingLimit not enforced)","details":"### Summary\n\nSince 2.18.0, when an `<iframe>` is not allowed and `disallowedTagsMode` is `'discard'` (the defaults),\nits raw-text content is re-sanitized by a recursive call to `sanitizeHtml(text, options)` (the change\nfrom #5564, fixing #5550). The recursion has no bound and starts each nested call with a fresh state.\nTwo consequences, both absent from 2.17.7 and 2.17.4:\n\n1. A few kilobytes of unclosed `<iframe>` tags throw `RangeError: Maximum call stack size exceeded`\n   with the default options. Any application that sanitizes untrusted HTML with 2.18.0 can be made to\n   throw on a small crafted input.\n2. `nestingLimit` is not enforced across a discarded iframe: each nested iframe restarts the depth\n   count at zero, so the output can be nested arbitrarily deep regardless of the configured limit.\n\n### Affected versions\n\n- 2.18.0 (the current `latest`), and the `main` branch at the time of writing (the recursive call is\n  still in `packages/sanitize-html/index.js`, in the `ontext` handler, branch\n  `tag === 'iframe' && !tagAllowed(tag) && options.disallowedTagsMode === 'discard'`).\n- Not affected: 2.17.7 and 2.17.4 (tested with the same inputs below).\n\nTested with Node.js v26.7.0.\n\n### Reproduction 1: stack overflow with the default options\n\n```js\nconst sanitizeHtml = require('sanitize-html');\n\n// with 2.18.0:\nsanitizeHtml('<iframe>'.repeat(1000));  // 8,000 chars: returns ''\nsanitizeHtml('<iframe>'.repeat(2000));  // 16,000 chars: throws RangeError: Maximum call stack size exceeded\nsanitizeHtml('<iframe>'.repeat(20000)); // 160,000 chars: throws RangeError: Maximum call stack size exceeded\n```\n\nResults:\n\n| input | 2.17.4 | 2.17.7 | 2.18.0 |\n|---|---|---|---|\n| `'<iframe>'.repeat(1000)` | ok | ok | ok |\n| `'<iframe>'.repeat(2000)` | ok | ok | RangeError |\n| `'<iframe>'.repeat(20000)` | ok | ok | RangeError |\n\nThe threshold depends on the remaining stack, so it is lower when `sanitizeHtml` is called from an\nalready deep call stack (for example inside a server-side rendering pass).\n\n### Reproduction 2: `nestingLimit` is bypassed\n\n```js\nconst sanitizeHtml = require('sanitize-html');\n\nconst input = ('<iframe>' + '<b>'.repeat(3)).repeat(50) + 'x';\nconst out = sanitizeHtml(input, { allowedTags: ['b'], nestingLimit: 3 });\n// maximum nesting depth of <b> in `out`:\n//   2.17.4: 2    2.17.7: 0 (fallback escaped as text)    2.18.0: 150\n```\n\nWithout an iframe, the same options cap the output at three nested `<b>` in all three versions. With\n`k` repetitions of `'<iframe>' + '<b>'.repeat(3)`, 2.18.0 returns `3 * k` nested `<b>` (measured for\nk = 1, 5, 50: depth 3, 15, 150).\n\n### Cause\n\nIn 2.18.0 the `ontext` handler does:\n\n```js\n} else if (\n  tag === 'iframe' &&\n  !tagAllowed(tag) &&\n  options.disallowedTagsMode === 'discard'\n) {\n  result += sanitizeHtml(text, options);\n}\n```\n\nBecause htmlparser2 treats `<iframe>` as a raw-text element, the text of an unclosed iframe is the whole\nremainder of the input; re-parsing it can meet another unclosed `<iframe>`, and so on, one stack frame\n(and one full re-parse) per iframe. The nested call also starts with its own `depth`, so tags inside the\nfallback are not counted against `nestingLimit` together with the enclosing tags.\n\n### Possible directions\n\nNot a patch, only what would close both effects: bound the recursion (or process the fallback without\nrecursing), and carry the current depth into the nested sanitization so that `nestingLimit` applies to\nthe whole output.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"GHSA-c9rx-x947-fp3h"}],"affected":[{"ecosystem":"npm","package":"sanitize-html","purl":"pkg:npm/sanitize-html","ranges":[{"type":"SEMVER","events":[{"introduced":"2.18.0"},{"fixed":"2.18.1"}]}],"fixed":["2.18.1"],"provider":"osv","source":"GHSA-c9rx-x947-fp3h","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113650"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"},{"type":"PACKAGE","url":"https://github.com/apostrophecms/apostrophe"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1"}]},{"provider":"redhat-vex","source_id":"CVE-2026-113650","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-113650","license":"CC-BY-4.0","published_at":"2026-10-20T16:19:12.1Z","modified_at":"2026-10-29T16:55:59Z","summary":"sanitize-html: sanitize-html: Denial of Service via unbounded recursion in iframe tag processing","details":"A flaw was found in sanitize-html. A remote attacker can cause a Denial of Service (DoS) by submitting specially crafted HTML input containing disallowed iframe elements. Under default configurations, the library re-sanitizes iframe content through unbounded recursive calls, exhausting system resources and causing the application to crash.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"CVE-2026-113650"},{"type":"Red Hat","score":"Moderate","source":"CVE-2026-113650"}],"affected":[{"ecosystem":"Red Hat:enterprise_linux:10","package":"cockpit-image-builder","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-113650","relation":"self"},{"ecosystem":"Red Hat:hummingbird:1","package":"prometheus3.5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-113650","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Cost Management On Premise","cpe":"cpe:/a:redhat:cost_management_on_premise:1","status":"affected","packages":["costmanagement/costmanagement-ui-rhel10"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Multicluster Engine for Kubernetes","cpe":"cpe:/a:redhat:multicluster_engine","status":"affected","packages":["multicluster-engine/console-mce-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"affected","packages":["rhacm2/console-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","cpe":"cpe:/a:redhat:enterprise_linux:10","status":"affected","packages":["cockpit-image-builder"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Hardened Images","cpe":"cpe:/a:redhat:hummingbird:1","status":"affected","packages":["prometheus3.5"],"package_count":1,"fixed":[],"advisories":[],"note":"Will not fix","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Hardened Images","cpe":"cpe:/a:redhat:hummingbird:1","status":"not_affected","packages":["prometheus3.13"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","cpe":"cpe:/a:redhat:openshift_ai","status":"affected","packages":["rhoai/odh-mlflow-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"affected","packages":["openshift4/ose-agent-installer-ui-rhel9","openshift4/ose-console","openshift4/ose-console-rhel9"],"package_count":3,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 5","cpe":"cpe:/a:redhat:openshift:5","status":"affected","packages":["openshift5/ose-agent-installer-ui-rhel9","openshift5/ose-console-rhel9"],"package_count":2,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","cpe":"cpe:/a:redhat:openshift_devspaces:3","status":"affected","packages":["devspaces/dashboard-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Quay 3","cpe":"cpe:/a:redhat:quay:3","status":"affected","packages":["quay/quay-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"Out of support scope","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Quay 3","cpe":"cpe:/a:redhat:quay:3","status":"affected","packages":["quay/quay-rhel9"],"package_count":1,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"},{"vendor":"Red Hat","product":"Red Hat Satellite 6","cpe":"cpe:/a:redhat:satellite:6","status":"affected","packages":["satellite/iop-advisor-frontend-rhel9","satellite/iop-host-inventory-frontend-rhel9","satellite/iop-vulnerability-frontend-rhel9"],"package_count":3,"fixed":[],"advisories":[],"note":"Fix deferred","provider":"redhat-vex","source":"CVE-2026-113650"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-113650.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-113650"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2556329"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-113650"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113650"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h"}]}],"references":[{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea"},{"type":"WEB","url":"https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1"},{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-qiev-3447-qi4g-cgmv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113650"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-c9rx-x947-fp3h"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-113650"},{"type":"FIX","url":"https://www.cve.org/CVERecord?id=CVE-2026-113650"},{"type":"PACKAGE","url":"https://github.com/apostrophecms/apostrophe"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-113650.json"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2556329"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2026-113650","url":"https://www.cve.org/CVERecord?id=CVE-2026-113650","license":"CC-BY-4.0","modified_at":"2026-10-28T14:02:38.5Z","relation":"self"},{"provider":"osv","source_id":"DHI-qiev-3447-qi4g-cgmv","url":"https://osv.dev/vulnerability/DHI-qiev-3447-qi4g-cgmv","license":"Apache-2.0","modified_at":"2026-11-16T02:36:07.205116Z","relation":"self"},{"provider":"osv","source_id":"GHSA-c9rx-x947-fp3h","url":"https://osv.dev/vulnerability/GHSA-c9rx-x947-fp3h","license":"CC-BY-4.0","modified_at":"2026-10-21T17:15:08.634885Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-113650","url":"https://access.redhat.com/security/cve/CVE-2026-113650","license":"CC-BY-4.0","modified_at":"2026-10-29T16:55:59Z","relation":"self"}]}
