IBM Support

Security Bulletin: @carbon/ai-chat is vulnerable to XSS if Object.prototype has been compromised in assistant provided content due to DOMPurify ( CVE-2026-41238 CVE-2026-41239 CVE-2026-41240)

Security Bulletin


Summary

DOMPurify trusts Object.prototype for security-critical config, which violates the principle that a sanitizer should be robust against a hostile global environment. If Object.prototype has been compromised, DOMPurify may not sanitize HTML propertly.

Vulnerability Details

CVEID:   CVE-2026-41238
DESCRIPTION:   DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Versions 3.0.1 through 3.3.3 are vulnerable to a prototype pollution-based XSS bypass. When an application uses `DOMPurify.sanitize()` with the default configuration (no `CUSTOM_ELEMENT_HANDLING` option), a prior prototype pollution gadget can inject permissive `tagNameCheck` and `attributeNameCheck` regex values into `Object.prototype`, causing DOMPurify to allow arbitrary custom elements with arbitrary attributes — including event handlers — through sanitization. Version 3.4.0 fixes the issue.
CWE:   CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVSS Source:   security-advisories@github.com
CVSS Base score:   6.9
CVSS Vector:   (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:N)

CVEID:   CVE-2026-41239
DESCRIPTION:   DOMPurify is a DOM-only cross-site scripting sanitizer for HTML, MathML, and SVG. Starting in version 1.0.10 and prior to version 3.4.0, `SAFE_FOR_TEMPLATES` strips `{{...}}` expressions from untrusted HTML. This works in string mode but not with `RETURN_DOM` or `RETURN_DOM_FRAGMENT`, allowing XSS via template-evaluating frameworks like Vue 2. Version 3.4.0 patches the issue.
CWE:   CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVSS Source:   security-advisories@github.com
CVSS Base score:   6.8
CVSS Vector:   (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N)

CVEID:   CVE-2026-41240
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.
CWE:   CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVSS Source:   NVD
CVSS Base score:   6.1
CVSS Vector:   (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)

Affected Products and Versions

Affected Products/Versions guidance:

1. Use a table 

2. Clearly identify the vulnerable products and associated component(s) when applicable

3. List out specific version numbers, do not use generic terms like "all" or "2.x." for version information

 

Affected Product(s)Version(s)
@carbon/ai-chat1.11.0
@carbon/ai-chat1.10.0
@carbon/ai-chat1.9.1
@carbon/ai-chat1.9.0
@carbon/ai-chat1.8.0
@carbon/ai-chat1.7.0
@carbon/ai-chat1.6.0
@carbon/ai-chat1.5.1
@carbon/ai-chat1.5.0
@carbon/ai-chat1.4.4
@carbon/ai-chat1.4.3
@carbon/ai-chat1.4.2
@carbon/ai-chat1.4.1
@carbon/ai-chat1.3.0
@carbon/ai-chat1.2.0
@carbon/ai-chat1.1.0
@carbon/ai-chat1.0.0
@carbon/ai-chat-components1.0.0
@carbon/ai-chat-components1.1.0

 

Remediation/Fixes

Remediation/Fixes guidance:

DOMPurify trusts Object.prototype for security-critical config, which violates the principle that a sanitizer should be robust against a hostile global environment. If Object.prototype has been compromised, DOMPurify may not sanitize HTML propertly. 

 

IBM strongly recommends addressing the vulnerability now.

Product(s)Version(s) number and/or range Remediation/Fix/Instructions
@carbon/ai-chat1.12.0Take new version of `@carbon/ai-chat` from npm.
@carbon/ai-chat1.2.0Take new version of `@carbon/ai-chat-components` from npm.

 

  

Workarounds and Mitigations

Workarounds/Mitigation guidance:

1. Instead of taking on a new version of `@carbon/ai-chat` you can update DomPurify to >= 3.4.0 in your local build.

 

Get Notified about Future Security Bulletins

References

Off

 

 

Acknowledgement

Change History

08 May 2026: Initial Publication

*The CVSS Environment Score is customer environment specific and will ultimately impact the Overall CVSS Score. Customers can evaluate the impact of this vulnerability in their environments by accessing the links in the Reference section of this Security Bulletin.

Disclaimer

According to the Forum of Incident Response and Security Teams (FIRST), the Common Vulnerability Scoring System (CVSS) is an "industry open standard designed to convey vulnerability severity and help to determine urgency and priority of response." IBM PROVIDES THE CVSS SCORES ""AS IS"" WITHOUT WARRANTY OF ANY KIND, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS ARE RESPONSIBLE FOR ASSESSING THE IMPACT OF ANY ACTUAL OR POTENTIAL SECURITY VULNERABILITY. In addition to other efforts to address potential vulnerabilities, IBM periodically updates the record of components contained in our product offerings. As part of that effort, if IBM identifies previously unidentified packages in a product/service inventory, we address relevant vulnerabilities regardless of CVE date. Inclusion of an older CVEID does not demonstrate that the referenced product has been used by IBM since that date, nor that IBM was aware of a vulnerability as of that date. We are making clients aware of relevant vulnerabilities as we become aware of them. "Affected Products and Versions" referenced in IBM Security Bulletins are intended to be only products and versions that are supported by IBM and have not passed their end-of-support or warranty date. Thus, failure to reference unsupported or extended-support products and versions in this Security Bulletin does not constitute a determination by IBM that they are unaffected by the vulnerability. Reference to one or more unsupported versions in this Security Bulletin shall not create an obligation for IBM to provide fixes for any unsupported or extended-support products or versions.

Document Location

Worldwide

[{"Business Unit":{"code":"","label":""},"Product":{"code":"SSNHB2","label":"Carbon"},"Component":"AI Chat","Platform":[{"code":"PF014","label":"iOS"},{"code":"PF018","label":"Mobile OS"},{"code":"PF022","label":"OS X"},{"code":"PF033","label":"Windows"},{"code":"PF052","label":"iPadOS"}],"Version":"\u0026lt; 1.11.0","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
08 May 2026

Initial Publish date:
08 May 2026

UID

ibm17272438