Skip to content

Fix/maplibre gl critical advisory - #41

Merged
pcsmomo merged 5 commits into
mainfrom
fix/maplibre-gl-critical-advisory
Sep 15, 2026
Merged

pcsmomo merged 5 commits into
mainfrom
fix/maplibre-gl-critical-advisory

Conversation

@pcsmomo

@pcsmomo pcsmomo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

vulnerability is back to 0!!

Noah Kim added 2 commits September 9, 2026 15:41
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
@pcsmomo
pcsmomo requested a review from a team September 10, 2026 23:21
Comment thread package.json Outdated
"@hookform/resolvers": "^5.2.1",
"lucide-react": "^0.525.0",
"plotly.js": "^3.0.1",
"plotly.js": "^3.0.1 || ^4.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@chanmSC chanmSC Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep happy with version 4.1.0

Comment thread package.json
"zod": "^4.0.5"
},
"overrides": {
"maplibre-gl": "^6.4.1"

@chanmSC chanmSC Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😂

@pcsmomo pcsmomo Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! 👍

@pcsmomo
pcsmomo requested review from a team and chanmSC September 11, 2026 00:52
Comment thread package.json Outdated
"@hookform/resolvers": "^5.2.1",
"lucide-react": "^0.525.0",
"plotly.js": "^3.0.1",
"plotly.js": "^3.0.1 || ^4.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The peer dependency still has "^3.0.1 || ^4.0.0"

Comment thread package.json Outdated
"@hookform/resolvers": "^5.2.1",
"lucide-react": "^0.525.0",
"plotly.js": "^3.0.1",
"plotly.js": "^3.0.1 || ^4.1.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your comment says it refers to an 'outdated' package.json! Could you check it again?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh weird! I still see the old ^3.0.1 || section in the latest file diffs?

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad! I read the comment wrong to keep ^3.0.1 lol
new commit has been pushed!

@pcsmomo
pcsmomo requested review from a team and chanmSC September 11, 2026 02:43
@chanmSC chanmSC mentioned this pull request Sep 11, 2026
@pcsmomo
pcsmomo merged commit b820f20 into main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants