ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| apostrophecms | apostrophe | affected |
|
||||||
| apostrophecms | sanitize-html | affected |
|
Configuration 1 [-]
|
Configuration 2 [-]
|
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Apostrophecms | Apostrophecms |
|
||||||||
| Apostrophecms | Sanitize-html |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-9mrh-v2v3-xpfm | sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.253% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| CPEs | cpe:2.3:a:apostrophecms:apostrophecms:4.29.0:*:*:*:*:*:*:* cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:* |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Apostrophecms
Apostrophecms apostrophecms Apostrophecms sanitize-html |
|
| Vendors & Products |
Apostrophecms
Apostrophecms apostrophecms Apostrophecms sanitize-html |
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements | |
| Weaknesses | CWE-79 | |
| References |
| |
| Metrics |
cvssV3_1
|