projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.45k stars 1.16k forks source link

pathfinding dependency is bringing in an old copy of jquery with vulnerabilities #995

Open scottdickerson opened 1 year ago

scottdickerson commented 1 year ago
/home/runner/work/contrast-ui/contrast-ui/node_modules/pathfinding/visual/lib/jquery-1.7.2.min.js
 ↳ jquery 1.7.2
jquery 1.7.2 has known vulnerabilities: severity: high; CVE: CVE-2012-6708, bug: 11290, summary: Selector interpreted as HTML, githubID: GHSA-2pqj-h3vj-pqgw; http://bugs.jquery.com/ticket/11290 https://nvd.nist.gov/vuln/detail/CVE-2012-6708 http://research.insecurelabs.org/jquery/test/ severity: medium; CVE: CVE-2020-7656, summary: Versions of jquery prior to 1.9.0 are vulnerable to Cross-Site Scripting. The load method fails to recognize and remove "<script>" HTML tags that contain a whitespace character, i.e: "</script >", which results in the enclosed script logic to be executed. This allows attackers to execute arbitrary JavaScript in a victim's browser.

if you run retireJS on your project you'll see this get flagged. Unfortunately pathfinding has not been updated to address this issue. Is it possible to remove the pathfinding dependency from react-diagrams-routing