SecurityContext

CVE-2026-40186: ApostropheCMS - Stored XSS

  • Cve: CVE-2026-40186
  • Name: ApostropheCMS - Stored XSS
  • 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.
  • Impact: Attackers can inject malicious scripts leading to cross-site scripting and potential user session compromise.
  • Remediation: Update sanitize-html to version 2.17.2 and ApostropheCMS to version 4.29.0 or later.
  • Vulnerability type: stored_xss
  • Vulnerability impact: stored_xss
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.00253
  • Epss percentile: 0.16889
  • Assignee: [email protected]
  • Published at: 2026-04-15T21:17:27Z
  • Age in days: 223
  • Modified at: 2026-10-26T21:10:00Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40186
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

Public exploits

UrlSourceAdded date
https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-9mrh-v2v3-xpfmnvd2026-04-15

References

UrlSourceTags
https://github.com/apostrophecms/apostrophe/commit/7ca2d16237c72718ef7e5c7ae0458e6027ac4f64nvdPatch
https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-9mrh-v2v3-xpfmnvdExploit, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
apostrophecms:apostrophecms= 4.29.0nonvd/v1/products/apostrophecms/apostrophecms
apostrophecms:sanitize-html<= 2.17.1nonvd/v1/products/apostrophecms/sanitize-html

Projects

RepositoryLink kindsIndexedUrl
apostrophecms/apostrophecommit, fix, package, security_advisoryyes/v1/repositories/apostrophecms/apostrophe

Index

  • Repositories: 3
  • Repositories high signal: 3
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2026-04-15
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts