CVE-2026-40186
CVE-2026-40186 is a medium-severity vulnerability in Apostrophecms with a CVSS 3.x base score of 6.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-79.
Key facts
- Severity: Medium (CVSS 3.x base score 6.1)
- EPSS exploit prediction: 0% (14th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-23110
- Weakness: CWE-79
- Affected product: Apostrophecms
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2026-40186?
- 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.
- How severe is CVE-2026-40186?
- CVE-2026-40186 has a CVSS 3.x base score of 6.1, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity low, and availability none.
- Is CVE-2026-40186 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (14th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-40186?
- CVE-2026-40186 primarily affects Apostrophecms. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2026-40186?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2026-40186 have an EU (EUVD) identifier?
- Yes. CVE-2026-40186 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-23110.
- When was CVE-2026-40186 published?
- CVE-2026-40186 was published on 2026-04-15 and last updated on 2026-06-17.
References
- https://github.com/apostrophecms/apostrophe/commit/7ca2d16237c72718ef7e5c7ae0458e6027ac4f64
- https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-9mrh-v2v3-xpfm
Affected products (2)
- cpe:2.3:a:apostrophecms:apostrophecms:4.29.0:*:*:*:*:*:*:*
- cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*
More vulnerabilities in Apostrophecms
- CVE-2021-25979 — Critical (CVSS 9.8): Apostrophe CMS versions prior to 3.3.1 did not invalidate existing login sessions when disabling a user account or…
- CVE-2026-35569 — High (CVSS 8.7): ApostropheCMS is an open-source Node.js content management system. Versions 4.28.0 and prior contain a stored…
- CVE-2026-32730 — High (CVSS 8.1): ApostropheCMS is an open-source content management framework. Prior to version 4.28.0, the bearer token authentication…
- CVE-2026-33889 — Medium (CVSS 5.4): ApostropheCMS is an open-source Node.js content management system. Versions 4.28.0 and prior contain a stored…
- CVE-2021-25978 — Medium (CVSS 5.4): Apostrophe CMS versions between 2.63.0 to 3.3.1 are vulnerable to Stored XSS where an editor uploads an SVG file that…
- CVE-2026-39857 — Medium (CVSS 5.3): ApostropheCMS is an open-source Node.js content management system. Versions 4.28.0 and prior contain an authorization…
All CVEs affecting Apostrophecms →
Other CWE-79 (Cross-site Scripting (XSS)) vulnerabilities
- CVE-2025-49410 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Imran Emu TC…
- CVE-2024-47875 — Critical (CVSS 10.0): DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to…
- CVE-2024-6886 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea…
- CVE-2023-45144 — Critical (CVSS 10.0): com.xwiki.identity-oauth:identity-oauth-ui is a package to aid in building identity and service providers based on…
- CVE-2023-45138 — Critical (CVSS 10.0): Change Request is an pplication allowing users to request changes on a wiki without publishing the changes directly.…
- CVE-2022-4361 — Critical (CVSS 10.0): Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the…
Browse all CWE-79 (Cross-site Scripting (XSS)) vulnerabilities →