Description
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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| apostrophecms | apostrophe | < 4.34.0 | — |
| apostrophecms | sanitize-html | >= 2.18.0, < 2.18.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | saf | 1.7.0-r4 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | sanitize-html | >= 2.18.0, < 2.18.1 | 2.18.1 | GHSA-c9rx-x947-fp3h |
References
- https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-c9rx-x947-fp3h
- https://github.com/apostrophecms/apostrophe/commit/06e4b377f3c360f9e89c32dccd7e505ad5ddf498
- https://github.com/apostrophecms/apostrophe/commit/40b989b1a9dd23d30029b8ce7668634265cfe5ea
- https://github.com/apostrophecms/apostrophe/releases/tag/sanitize-html@2.18.1