Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-40186

Опубликовано: 15 апр. 2026
Источник: redhat
CVSS3: 6.1
EPSS Низкий

Описание

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.

A flaw was found in the sanitize-html package, a dependency of ApostropheCMS. A remote attacker could exploit a regression in sanitize-html versions prior to 2.17.2, which incorrectly handles entity decoding within textarea and option HTML elements. This allows an attacker to bypass the allowedTags filter by using entity encoding, leading to the injection of arbitrary HTML tags, including Cross-Site Scripting (XSS) payloads. Successful exploitation could result in arbitrary code execution in the context of the user's browser.

Отчет

This Moderate flaw in the sanitize-html package, a dependency for several Red Hat products, enables Cross-Site Scripting (XSS) attacks. The vulnerability occurs when entity-encoded HTML within textarea or option elements bypasses the allowedTags filter. Exploitation is limited to non-default configurations where these elements are explicitly permitted in allowedTags, reducing the immediate risk to typical Red Hat deployments.

Меры по смягчению последствий

To mitigate this issue, ensure that textarea and option elements are not explicitly included in the allowedTags configuration of the sanitize-html package. If these elements are essential, implement robust input validation at the application layer to prevent the injection of entity-encoded HTML. Review and harden content sanitization policies to prevent Cross-Site Scripting.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Multicluster Engine for Kubernetesmulticluster-engine/console-mce-rhel9Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel9Fix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-mlflow-rhel9Fix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-agent-installer-ui-rhel9Fix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-consoleFix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-console-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/dashboard-rhel9Out of support scope
Red Hat OpenShift Virtualization 4container-native-virtualization/kubevirt-console-plugin-rhel9Fix deferred
Red Hat Quay 3quay/quay-rhel8Fix deferred
Red Hat Quay 3quay/quay-rhel9Fix deferred

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-838
https://bugzilla.redhat.com/show_bug.cgi?id=2458831sanitize-html: ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements

EPSS

Процентиль: 14%
0.00235
Низкий

6.1 Medium

CVSS3

Связанные уязвимости

CVSS3: 6.1
nvd
4 месяца назад

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 texta

CVSS3: 6.1
github
4 месяца назад

sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements

EPSS

Процентиль: 14%
0.00235
Низкий

6.1 Medium

CVSS3