Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-40186: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in apostrophecms apostrophe

0
Medium
VulnerabilityCVE-2026-40186cvecve-2026-40186cwe-79
Published: Wed Apr 15 2026 (04/15/2026, 20:15:12 UTC)
Source: CVE Database V5
Vendor/Project: apostrophecms
Product: apostrophe

Description

ApostropheCMS versions 4. 28. 0 prior to 4. 29. 0 are affected by a cross-site scripting (XSS) vulnerability due to improper neutralization of input in the sanitize-html dependency. This vulnerability arises from a regression in sanitize-html version 2. 17. 1 that allows entity-encoded HTML inside textarea and option elements to bypass allowedTags filtering, enabling injection of arbitrary HTML tags including XSS payloads. The issue affects configurations where option or textarea tags are allowed, common in form builders and CMS platforms. The vulnerability has been fixed in sanitize-html 2.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/15/2026, 20:46:57 UTC

Technical Analysis

ApostropheCMS 4.28.0 is vulnerable to a cross-site scripting (CWE-79) issue due to a regression in its sanitize-html dependency (version 2.17.1). The sanitize-html code incorrectly assumes that htmlparser2 does not decode entities inside textarea and option elements, skipping escaping for these tags. However, htmlparser2 10.x decodes entities before text is processed, allowing entity-encoded HTML to be decoded and injected as literal HTML, bypassing allowedTags filtering. This enables attackers to inject arbitrary tags, including XSS payloads, through allowed option or textarea elements. The vulnerability affects non-default configurations that include these tags in allowedTags. The issue was fixed in sanitize-html 2.17.2 and ApostropheCMS 4.29.0.

Potential Impact

An attacker can inject arbitrary HTML tags, including malicious scripts, into ApostropheCMS instances configured to allow option or textarea tags, leading to cross-site scripting attacks. This can result in limited confidentiality and integrity impacts via script execution in the context of the affected web application. The vulnerability requires user interaction (UI:R) and has network attack vector (AV:N) with low attack complexity (AC:L) and no privileges required (PR:N). There are no known exploits in the wild at this time.

Mitigation Recommendations

A fix is available. Users should upgrade ApostropheCMS to version 4.29.0 or later, which includes the patched sanitize-html dependency version 2.17.2. Applying these updates will resolve the XSS vulnerability. Until upgraded, avoid configurations that allow option or textarea tags in allowedTags or apply additional input validation controls. Patch status is confirmed by the vendor advisory indicating the fix in version 4.29.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-09T20:59:17.620Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 69dff5b982d89c981f9734d0

Added to database: 4/15/2026, 8:31:53 PM

Last enriched: 4/15/2026, 8:46:57 PM

Last updated: 4/15/2026, 9:37:38 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses