CVE-2023-31126

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-31126
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-31126.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-31126
Aliases
Published
2023-05-09T12:53:59.691Z
Modified
2025-12-07T04:07:17.624741Z
Severity
  • 9.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H CVSS Calculator
Summary
Improper Neutralization of Invalid Characters in Data Attribute Names in org.xwiki.commons:xwiki-commons-xml
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/31xxx/CVE-2023-31126.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-86"
    ]
}
References

Affected packages

Git / github.com/xwiki/xwiki-commons

Affected ranges

Type
GIT
Repo
https://github.com/xwiki/xwiki-commons
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

xwiki-commons-7.*

xwiki-commons-7.3-milestone-2
xwiki-commons-7.4-milestone-1
xwiki-commons-7.4-milestone-2

xwiki-commons-8.*

xwiki-commons-8.0-milestone-1
xwiki-commons-8.0-milestone-2
xwiki-commons-8.1-milestone-1
xwiki-commons-8.1-milestone-2
xwiki-commons-8.2-milestone-1
xwiki-commons-8.2-milestone-2
xwiki-commons-8.3-milestone-1
xwiki-commons-8.3-milestone-2

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "source": "https://github.com/xwiki/xwiki-commons/commit/0b8e9c45b7e7457043938f35265b2aa5adc76a68",
        "signature_version": "v1",
        "deprecated": false,
        "id": "CVE-2023-31126-16a674a3",
        "target": {
            "file": "xwiki-commons-core/xwiki-commons-xml/src/test/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizerTest.java"
        },
        "digest": {
            "line_hashes": [
                "277609538550200280766756836484860160088",
                "104005773375830011039084591293593369623",
                "161983515280050812476512095779030327161",
                "325946673509890689612754788780193094655",
                "26135476083915701278460318095781260141",
                "30857316161602698433636375436080481022",
                "34755491141602183315548939707601451585",
                "225592115893993154555870840772004608294",
                "340143317715773006120296285949531724344"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_type": "Line",
        "source": "https://github.com/xwiki/xwiki-commons/commit/0b8e9c45b7e7457043938f35265b2aa5adc76a68",
        "signature_version": "v1",
        "deprecated": false,
        "id": "CVE-2023-31126-72be4c37",
        "target": {
            "file": "xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java"
        },
        "digest": {
            "line_hashes": [
                "210802515215738816743813826139138447506",
                "238946425790983110154695383258798458851",
                "313951864791789035542385919419657325849",
                "149006812823698660430523833625951733826",
                "102912083312246903873778847915734968814",
                "114479292963951221005614132434104762085",
                "335009252291491752776308746579494048635",
                "265547110551019085133869148995424225407"
            ],
            "threshold": 0.9
        }
    }
]

Git / github.com/xwiki/xwiki-platform

Affected ranges

Type
GIT
Repo
https://github.com/xwiki/xwiki-platform
Events