CVE-2026-40186 ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- Red Hat
Description
ApostropheCMS is an open-source Node.js content management system. A regression introduced in commit 49d0bb7, included in versions 2.17.1 of the ApostropheCMS-maintained sanitize-html package bypasses allowedTags enforcement for text inside nonTextTagsArray elements (textarea and option). ApostropheCMS version 4.28.0 is affected through its dependency on the vulnerable sanitize-html version. The code at packages/sanitize-html/index.js:569-573 incorrectly assumes that htmlparser2 does not decode entities inside these elements and skips escaping, but htmlparser2 10.x does decode entities before passing text to the ontext callback. As a result, entity-encoded HTML is decoded by the parser and then written directly to the output as literal HTML characters, completely bypassing the allowedTags filter. An attacker can inject arbitrary tags including XSS payloads through any allowed option or textarea element using entity encoding. This affects non-default configurations where option or textarea are included in allowedTags, which is common in form builders and CMS platforms. This issue has been fixed in version 2.17.2 of sanitize-html and 4.29.0 of ApostropheCMS.
Upgrade path
19 packages: 2 fixed, 15 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/container-native-virtualization/kubevirt-console-plugin-rhel9(Red Hat container_native_virtualization 4) | All versions | No fix listed | No fix yet |
| redhat/multicluster-engine/console-mce-rhel9(Red Hat multicluster_engine) | All versions | No fix listed | No fix yet |
| redhat/nodejs-sanitize-html(Red Hat satellite 6) | All versions | No fix listed | No fix yet |
| redhat/openshift4/ose-agent-installer-ui-rhel9(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| redhat/openshift4/ose-console(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| redhat/openshift4/ose-console-rhel9(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| redhat/openshift5/ose-agent-installer-ui-rhel9(Red Hat openshift 5) | All versions | No fix listed | No fix yet |
| redhat/openshift5/ose-console-rhel9(Red Hat openshift 5) | All versions | No fix listed | No fix yet |
| redhat/quay/quay-rhel8(Red Hat quay 3) | All versions | No fix listed | No fix yet |
| redhat/quay/quay-rhel9(Red Hat quay 3) | All versions | No fix listed | No fix yet |
| redhat/rhacm2/console-rhel9(Red Hat acm 2) | All versions | No fix listed | No fix yet |
| redhat/rhoai/odh-mlflow-rhel9(Red Hat openshift_ai) | All versions | No fix listed | No fix yet |
| redhat/satellite/iop-advisor-frontend-rhel9(Red Hat satellite 6) | All versions | No fix listed | No fix yet |
| redhat/satellite/iop-host-inventory-frontend-rhel9(Red Hat satellite 6) | All versions | No fix listed | No fix yet |
| redhat/satellite/iop-vulnerability-frontend-rhel9(Red Hat satellite 6) | All versions | No fix listed | No fix yet |
| apostrophecms sanitize-html | <= 2.17.1; = >= 2.17.1, < 2.17.2 | after 2.17.1 | Fixed |
| npm sanitize-html(npm) | >= 2.17.2, < 2.17.3 | 2.17.3 | Fixed |
| apostrophecms | = 4.29.0 | No fix listed | Versions listed |
| apostrophecms apostrophe | = >= 4.28.0, < 4.29.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| apostrophecms apostrophe | = >= 4.28.0, < 4.29.0 | No fix listed |
| apostrophecms sanitize-html | = >= 2.17.1, < 2.17.2 | No fix listed |
| npm sanitize-html(npm) | >= 2.17.2, < 2.17.3 | 2.17.3 |
| redhat/multicluster-engine/console-mce-rhel9(Red Hat:multicluster_engine) | All versions | No fix listed |
| redhat/rhacm2/console-rhel9(Red Hat:acm:2) | All versions | No fix listed |
| redhat/rhoai/odh-mlflow-rhel9(Red Hat:openshift_ai) | All versions | No fix listed |
| redhat/openshift4/ose-agent-installer-ui-rhel9(Red Hat:openshift:4) | All versions | No fix listed |
| redhat/openshift4/ose-console(Red Hat:openshift:4) | All versions | No fix listed |
| redhat/openshift4/ose-console-rhel9(Red Hat:openshift:4) | All versions | No fix listed |
| redhat/openshift5/ose-agent-installer-ui-rhel9(Red Hat:openshift:5) | All versions | No fix listed |
| redhat/openshift5/ose-console-rhel9(Red Hat:openshift:5) | All versions | No fix listed |
| redhat/devspaces/dashboard-rhel9(Red Hat:openshift_devspaces:3) | All versions | No fix listed |
| redhat/container-native-virtualization/kubevirt-console-plugin-rhel9(Red Hat:container_native_virtualization:4) | All versions | No fix listed |
| redhat/quay/quay-rhel8(Red Hat:quay:3) | All versions | No fix listed |
| redhat/quay/quay-rhel9(Red Hat:quay:3) | All versions | No fix listed |
| redhat/nodejs-sanitize-html(Red Hat:satellite:6) | All versions | No fix listed |
| redhat/satellite/iop-advisor-frontend-rhel9(Red Hat:satellite:6) | All versions | No fix listed |
| redhat/satellite/iop-host-inventory-frontend-rhel9(Red Hat:satellite:6) | All versions | No fix listed |
| redhat/satellite/iop-vulnerability-frontend-rhel9(Red Hat:satellite:6) | All versions | No fix listed |
| apostrophecms | = 4.29.0 | No fix listed |
| apostrophecms sanitize-html | <= 2.17.1 | No fix listed |
References
- https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-9mrh-v2v3-xpfm exploit vendor-advisory
- https://github.com/apostrophecms/apostrophe/commit/7ca2d16237c72718ef7e5c7ae0458e6027ac4f64 patch
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2458831 issue-tracking
- www.cve.org
- github.com product