CVE-2026-41240
Vulnerability Summary
Timeline
Description
DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions prior to 3.4.0 have an inconsistency between FORBID_TAGS and FORBID_ATTR handling when function-based ADD_TAGS is used. Commit c361baa added an early exit for FORBID_ATTR at line 1214. The same fix was not applied to FORBID_TAGS. At line 1118-1123, when EXTRA_ELEMENT_HANDLING.tagCheck returns true, the short-circuit evaluation skips the FORBID_TAGS check entirely. This allows forbidden elements to survive sanitization with their attributes intact. Version 3.4.0 patches the issue.
CVSS Metrics
- v4.0•MEDIUM•Score: 6CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
- v4.0•MEDIUM•Score: 6CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- v3.1•MEDIUM•Score: 6.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS Trends
Current EPSS score: 0.31%• Percentile: 24%
Techniques & Countermeasures
- CWE-79•Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-183•Permissive List of Allowed Inputs
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.
Affected Systems
- chainguard•airflow-2
all
- chainguard•airflow-core-2
all
- chainguard•gitlab-rails-ce-18.1
all
- chainguard•gitlab-rails-ce-18.10
all
- chainguard•gitlab-rails-ce-18.11
all
- chainguard•gitlab-rails-ce-18.5
all
- chainguard•gitlab-rails-ce-18.6
all
- chainguard•gitlab-rails-ce-18.7
all
- chainguard•gitlab-rails-ce-18.8
all
- chainguard•gitlab-rails-ce-18.9
all
- chainguard•gitlab-rails-ce-fips-18.1
all
- chainguard•gitlab-rails-ce-fips-18.10
all
- chainguard•gitlab-rails-ce-fips-18.11
all
- chainguard•gitlab-rails-ce-fips-18.5
all
- chainguard•gitlab-rails-ce-fips-18.6
all
- chainguard•gitlab-rails-ce-fips-18.7
all
- chainguard•gitlab-rails-ce-fips-18.8
all
- chainguard•gitlab-rails-ce-fips-18.9
all
- chainguard•langfuse-fips-3
< 3.164.0-r6
- chainguard•langfuse-fips-3-worker
< 3.164.0-r6
- chainguard•langfuse-fips-3.152
all
- chainguard•langfuse-fips-3.152-worker
all
- chainguard•nextcloud-server-31
all
- chainguard•nextcloud-server-33
< 33.0.6-r0
- chainguard•opensearch-dashboards-3
< 3.6.0-r3
- chainguard•opensearch-dashboards-3-fips
< 3.6.0-r4
- chainguard•wazuh-dashboard-alerting-dashboards-plugin
< 4.14.4-r3
- chainguard•wazuh-dashboard-anomaly-detection-dashboards-plugin
< 4.14.4-r3
- chainguard•wazuh-dashboard-dashboards-maps
< 4.14.4-r3
- chainguard•wazuh-dashboard-dashboards-notifications
< 4.14.4-r3
- chainguard•wazuh-dashboard-dashboards-reporting
< 4.14.4-r3
- chainguard•wazuh-dashboard-dashboards-visualizations
< 4.14.4-r3
- chainguard•wazuh-dashboard-index-management-dashboards-plugin
< 4.14.4-r3
- chainguard•wazuh-dashboard-plugins
< 4.14.4-r3
- chainguard•wazuh-dashboard-plugins-fips
< 4.14.4-r2
- wolfi•nextcloud-server-33
< 33.0.6-r0
- wolfi•opensearch-dashboards-3
< 3.6.0-r3
- cure53•dompurify
< 3.4.0
- debian•node-dompurify
all | all | < 3.4.1+dfsg-1
- Npm•dompurify
< 3.4.0
References (7)
- https://github.com/cure53/DOMPurify/security/advisories/GHSA-h7mw-gpvr-xq4m
- https://github.com/cure53/DOMPurify
- https://github.com/cure53/DOMPurify/releases/tag/3.4.0
- https://github.com/cure53/DOMPurify/commit/c361baa18dbdcb3344a41110f4c48ad85bf48f80
- https://nvd.nist.gov/vuln/detail/CVE-2026-41240
- https://security-tracker.debian.org/tracker/CVE-2026-41240
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41240.json