{"answers":{"affected":"2 open source packages ship an affected version, including @node-red/runtime. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-21298 in the wild and no public exploit code.","fix":"Upgrade @node-red/runtime to 1.2.8 or later.","what":"CVE-2021-21298 is a low-severity vulnerability in node-red, published on 26 Feb 2021."},"fix_prompt":"Check this codebase for CVE-2021-21298 and fix it if it is affected.\n\nWhat it is: CVE-2021-21298 is a low-severity vulnerability in node-red, published on 26 Feb 2021. \nExploitation: There is no known exploitation of CVE-2021-21298 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @node-red/runtime (npm): affected all versions; fixed in 1.2.8\n- @node-red/runtime (npm): affected all versions; fixed in 1.2.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-21298/ (Markdown: https://insights.sbomify.com/CVE-2021-21298/index.md)","id":"CVE-2021-21298","markdown":"https://insights.sbomify.com/CVE-2021-21298/index.md","name":"CVE-2021-21298","record":{"aliases":["GHSA-m33v-338h-4v9f"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[{"product":"node-red","vendor":"nodered"}],"cvss":{"score":3.5,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Path traversal in Node-Red","id":"CVE-2021-21298","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"Multiple Transfer-Encoding headers misinterprets request payload","id":"CVE-2021-21299"},"packages":[{"ecosystem":"npm","fixed":["1.2.8"],"introduced":["0"],"last_affected":[],"package":"@node-red/runtime","purl":null,"source":"GHSA-m33v-338h-4v9f"},{"ecosystem":"npm","fixed":["1.2.8"],"introduced":["0"],"last_affected":[],"package":"@node-red/runtime","purl":"pkg:npm/%40node-red/runtime","source":"GHSA-m33v-338h-4v9f"}],"prev":{"headline":"Prototype Pollution in Node-Red","id":"CVE-2021-21297"},"products":["node-red"],"published":"2021-02-26","related":[{"cvss_score":7.7,"headline":"Prototype Pollution in Node-Red","id":"CVE-2021-21297","kev_date_added":null,"published":"2021-02-26"},{"cvss_score":5.4,"headline":"Cross-Site Scripting in node-red","id":"CVE-2019-15607","kev_date_added":null,"published":"2020-01-28"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["node-red"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2021-21298/"}