Repository navigation
Fix/maplibre gl critical advisory - #41
Conversation
This does not resolve the maplibre-gl advisory - plotly 4 still pins maplibre-gl ^5.24.0, which remains inside the affected <=6.4.0 range.
MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip GHSA-jrc7-96c5-q579
| "@hookform/resolvers": "^5.2.1", | ||
| "lucide-react": "^0.525.0", | ||
| "plotly.js": "^3.0.1", | ||
| "plotly.js": "^3.0.1 || ^4.0.0", |
There was a problem hiding this comment.
Is there a particular reason you want to allow peer dependency to have ver ^3.0.1, isn't it safer to also enforce ^4.1.0 in peer dependency to match what the dev dependency imported?
There was a problem hiding this comment.
If it only sets v4, consumer projects would fail to install the package unless they upgrade plotly.js to v4 in their own projects. For myself, only xas-web-ui is using sci-comp-ui, and I've already upgraded to plotly.js v4, so it's fine for me. However, I wasn't sure what other projects are using this library or which plotly.js version they're on, so using peerDependencies was just a safe way not to break them. But happy to remove v3 if everyone's okay!
By the way, ^4.1.0 makes more sense than ^4.0.0. I'll fix it!
There was a problem hiding this comment.
I think just remove the ^3.0.1 is fine 👍
Atm, it's you or me or Stephen installing and using this package in other repos/services, so I think it's better to enforce that we upgrade those repos/services to support this version, because it will also help ensure that everything people import will work as intended 👍
| "zod": "^4.0.5" | ||
| }, | ||
| "overrides": { | ||
| "maplibre-gl": "^6.4.1" |
There was a problem hiding this comment.
I assume the issue is some package dependency versions incompatibility then? 😅 Could you add a "Known Issues" section into the readme, and memo down which package's dependency is causing the vulnerability requiring us to temporarily override maplibre-gl version?
That way everyone will know to periodically check if the issue is fixed, and we will maybe be able to remove this manual package version override later.
Otherwise this override will live here forever because everyone will be too scared to remove it later if they don't know why it's here 😂
There was a problem hiding this comment.
Good point! I'll add some documentation :)
This was one of the critical vulnerabilities we were tracking: GHSA-jrc7-96c5-q579
maplibre-gl comes from plotly.js, but even the latest plotly.js (v4.1.0) uses an older version of maplibre-gl. So to fix the vulnerability right now, I had to use an override.
There was a problem hiding this comment.
Great! Yeah, you can just copy paste that into the readme under a "known issues" section.
Then everyone will know we can just occasionally keep an eye out for when plotly.js package updates their maplibre-gl dependency version, easy! 👍
| "@hookform/resolvers": "^5.2.1", | ||
| "lucide-react": "^0.525.0", | ||
| "plotly.js": "^3.0.1", | ||
| "plotly.js": "^3.0.1 || ^4.0.0", |
There was a problem hiding this comment.
The peer dependency still has "^3.0.1 || ^4.0.0"
| "@hookform/resolvers": "^5.2.1", | ||
| "lucide-react": "^0.525.0", | ||
| "plotly.js": "^3.0.1", | ||
| "plotly.js": "^3.0.1 || ^4.1.0", |
There was a problem hiding this comment.
Your comment says it refers to an 'outdated' package.json! Could you check it again?
There was a problem hiding this comment.
My bad! I read the comment wrong to keep ^3.0.1 lol
new commit has been pushed!

vulnerability is back to 0!!