Skip to main content

Apostrophecms CVE-2026-40186

| EUVDEUVD-2026-23110 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-04-15 GitHub_M GHSA-9mrh-v2v3-xpfm
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    User submits form with textarea/option
  2. Delivery
    Entity-encoded XSS payload enters allowedTags element
  3. Exploit
    htmlparser2 decodes entities to literal HTML
  4. Install
    sanitize-html skips escaping for non-text elements
  5. C2
    Malicious script tag written to output
  6. Execute
    Rendered in victim's browser
  7. Impact
    XSS executes in user context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires THREE specific conditions: (1) textarea or option elements must be explicitly included in the allowedTags configuration-this is non-default behavior, though common in form builders and CMS platforms that allow rich form construction; (2) the attacker must have the ability to submit or control input to these elements, typically through a public-facing form or content submission feature; and (3) user interaction is required (UI:R in CVSS vector), meaning the victim must view the rendered output (e.g., navigate to a page containing the injected content or load an email with the payload). Default ApostropheCMS configurations that do not explicitly whitelist textarea or option are NOT affected. The vulnerability does not require authentication (PR:N) and is remotely accessible (AV:N), but the non-default allowedTags requirement and user interaction prerequisite significantly limit real-world impact compared to unauthenticated network RCE.

Impact

The CVSS score of 6.1 with network vector (AV:N), low complexity (AC:L), no privilege requirement (PR:N), and required user interaction (UI:R) indicates moderate risk from a network perspective, but the real-world impact is constrained by non-default configuration requirements. The CVSS scope change (S:C) indicates the vulnerability can affect resources beyond the application's security scope, consistent with stored XSS scenarios. The presence of a GitHub security advisory (GHSA-9mrh-v2v3-xpfm) confirms vendor acknowledgment, but no CISA KEV listing or public proof-of-concept code has been identified at time of analysis, suggesting either recent disclosure or limited active exploitation. The attack requires three preconditions: (1) textarea or option must be in the allowedTags configuration (non-default), (2) user must supply input through these elements, and (3) user interaction (UI:R) is required, likely form submission. These conditions significantly reduce real-world exploitability compared to the CVSS score alone. The vulnerability is easily exploitable once conditions are met-entity encoding is trivial to apply-so organizations using form builders or CMS systems with textarea/option in allowedTags should prioritize patching. However, default ApostropheCMS configurations using the standard allowedTags list are unlikely to be affected.

Exploit ScenarioDerived

An attacker submits a form on a vulnerable ApostropheCMS site containing a textarea or option element configured in allowedTags. The attacker enters entity-encoded XSS payload such as <script>alert('XSS')</script> into the form field. When the form is submitted and processed by the sanitize-html library, the parser decodes the entities to literal HTML characters, bypassing the allowedTags filter, and the script tag is written to the output and rendered in the browser of any user viewing the content, executing arbitrary JavaScript in the victim's context.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 16, 2026

Cross-site scripting (XSS) in ApostropheCMS 4.28.0 and sanitize-html 2.17.1 allows remote attackers to bypass HTML tag filtering and inject arbitrary tags through entity-encoded payloads in textarea and option elements. A regression in the sanitize-html parser incorrectly assumes htmlparser2 does not decode entities within non-text elements, causing encoded HTML to be decoded and written directly to output without sanitization. Exploitation requires non-default configurations where textarea or option tags are in the allowedTags list, commonly found in form builders, and user interaction to submit form content. No active exploitation has been identified at time of analysis, but the vulnerability is trivial to exploit once configuration conditions are met.

RemediationAI

Upgrade sanitize-html to version 2.17.2 or later, and upgrade ApostropheCMS to version 4.29.0 or later, as confirmed by the GitHub security advisory at https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-9mrh-v2v3-xpfm. For applications that cannot immediately upgrade, remove textarea and option from the allowedTags configuration if they are not essential to functionality-this eliminates the attack vector entirely but may break form-building features if those tags are relied upon. As a temporary compensating control, implement input validation to reject or escape entity-encoded characters (&#...; patterns) in textarea and option element content before sanitization, though this is not a complete mitigation and should not be considered a long-term solution. Applications using ApostropheCMS should prioritize the upgrade path since version 4.29.0 is available and fixes the regression at the source. For sanitize-html library consumers using direct dependency, bumping to 2.17.2 is the minimal fix.

Affected VersionsENISA

Apostrophe 4.28.0, < 4.29.0
sanitize-html 2.17.1, < 2.17.2

Affected Packages

npm sanitize-html fix: 2.17.2, 2.17.3
euvd apostrophe_4_28_0 fix: 4.29.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability stems from a logic error in sanitize-html's entity-handling code for non-text elements. The sanitize-html package is a Node.js HTML sanitizer that maintains an allowedTags list to prevent XSS attacks. In version 2.17.1, the code at packages/sanitize-html/index.js:569-573 skips HTML entity escaping for textarea and option elements because it incorrectly assumes htmlparser2 (the underlying HTML parser) does not decode HTML entities before passing text content to callbacks. However, htmlparser2 version 10.x changed behavior and now decodes entities before the ontext callback, causing entity-encoded HTML like &#60;script&#62; to be decoded to literal <script> and written directly to output, completely bypassing the allowedTags allowlist. This affects ApostropheCMS 4.28.0 through its direct dependency on the vulnerable sanitize-html 2.17.1 package (CPE: cpe:2.3:a:apostrophecms:apostrophe:*:*:*:*:*:*:*:* and cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:*:*:*). The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), where insufficient escaping of user-controlled input allows injection of unvalidated HTML.

Know when Apostrophecms gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 6.1 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

3
Patch released
Apr 25, 2026 - 18:15 nvd
Patch available
Patch available
Apr 16, 2026 - 05:29 EUVD
4.29.0,2.17.2
CVE Published
Apr 15, 2026 - 20:15 nvd
MEDIUM 6.1

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2026-63669 MEDIUM POC
6.5 Aug 17

Integrity bypass in ApostropheCMS page management allows authenticated low-privileged editors to move pages into restric

CVE-2026-63670 MEDIUM POC
6.1 Aug 17

Stored cross-site scripting in ApostropheCMS prior to 2.17.6 enables execution of arbitrary JavaScript in victim browser

CVE-2014-125128 MEDIUM POC
6.1 Sep 08

'sanitize-html' prior to version 1.0.3 is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1), th

CVE-2019-25225 MEDIUM POC
6.1 Sep 08

`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS 6.1

CVE-2021-25979 CRITICAL
9.8 Nov 08

Apostrophe CMS versions prior to 3.3.1 did not invalidate existing login sessions when disabling a user account or chang

CVE-2026-84371 MEDIUM POC
5.4 Sep 01

Stored XSS in sanitize-html versions 1.9.0 through 2.17.6 allows authenticated low-privileged users to inject executable

CVE-2024-21501 MEDIUM POC
5.3 Feb 24

Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and

CVE-2021-26540 MEDIUM POC
5.3 Feb 08

Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the hostnames set by the "allowedIframeHos

CVE-2021-26539 MEDIUM POC
5.3 Feb 08

Apostrophe Technologies sanitize-html before 2.3.1 does not properly handle internationalized domain name (IDN) which co

CVE-2026-53609 CRITICAL
9.1 Jun 12

Prototype pollution in ApostropheCMS versions up to and including 4.30.0 allows an authenticated editor to poison Object

CVE-2026-53608 HIGH
8.7 Jun 12

Stored cross-site scripting in the @apostrophecms/seo plugin (versions ≤1.4.2) allows any user holding the default edito

CVE-2026-35569 HIGH
8.7 Apr 15

Stored cross-site scripting in ApostropheCMS SEO fields permits an authenticated attacker to inject arbitrary JavaScript

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy