T09 · Insecure Skill Coding Practices
- Location
scripts/nr_api.py:13- Finding
Node-RED administrator credentials may be transmitted over plaintext HTTP
- Content
View full analysis
bool: url = f"{self.base_url}/auth/token" payload = { "client_id": "node-red-admin", "grant_type": "password", "scope": "*", "username": self.username, "password": self.password } try: resp = requests.post(url, json=payload, timeout=API_TIMEOUT) ``` ### Technical Analysis The Node-RED endpoint is configurable and may use an `http://` URL. The implementation does not reject plaintext HTTP when the destination is a non-loopback host. During authentication, the administrator username and password are placed in a JSON request body and transmitted to `/auth/token`. Subsequent API requests also send the returned bearer token to the same endpoint. The localhost HTTP default is reasonable for a Node-RED instance accessed entirely through the local loopback interface. However, the documented configuration supports a remote endpoint without enforcing TLS. If a user configures a remote plaintext URL, credentials and tokens are vulnerable to passive network capture or active man-in-the-middle interception. This network communication is necessary for the declared Node-RED management functionality and is directed only to the configured Node-RED insta ...[truncated 1305 chars]- Remediation
View remediation
