fix(security): update vulnerable postcss dependency - #31318
Conversation
|
@anupamme is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
|
I think PR can be closed because the current main branch already uses PostCSS 8.5.14, which fixes CVE-2026-45623. |
Pins the transitive postcss dependency in packages/vue-router to 8.5.23 via npm overrides. main currently resolves postcss to 8.5.14 incidentally (no override), which does not include the source-map path-restriction fix (8.5.18) or the opts.from-unset fix (8.5.23). 8.5.23 is used as a conservative floor since 8.5.24 reportedly introduced a BOM regression for some consumers. Verified with npm ls postcss --all (8.5.14 -> 8.5.23, overridden) and npm audit (postcss-related advisories cleared). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
928dcd3 to
479a7b6
Compare
|
@Benziza You're right that `main` no longer has the original CVE-2026-45623 issue — it's already at postcss 8.5.14, which is past the 8.5.12 fix. However, 8.5.14 is still below 8.5.18 (source-map path-restriction fix, GHSA-r28c-9q8g-f849, see #31317) and below 8.5.23 (fixes the case where `opts.from` is unset). Neither of those later fixes is covered yet, and there's no explicit override pinning the version, so a future lockfile regen could regress it. I've rebased this PR onto current `main` and updated it to override postcss to 8.5.23 instead, which covers the remaining known issues. Updated the PR description with before/after `npm ls postcss` evidence. Given the overlap with #31317 (which targets 8.5.18), I've also left a note there — happy to consolidate however maintainers prefer rather than land two overlapping postcss fixes. |
Summary
Remediates a vulnerable transitive
postcssdependency used bypackages/vue-router.maincurrently resolvespostcssto8.5.14incidentally (no override in place), which does not include:8.5.18(GHSA-r28c-9q8g-f849 — see fix: upgrade postcss to 8.5.18 (GHSA-r28c-9q8g-f849) #31317)opts.from-unset fix shipped in8.5.23This PR adds an npm override so
packages/vue-routerresolvespostcssto8.5.23, which includes both of the above fixes.8.5.23is used as the floor rather than the latest8.5.26because8.5.24reportedly introduced a BOM regression for some consumers, making8.5.23the more conservative, defensible target.Why
The affected PostCSS versions can process attacker-controlled
sourceMappingURLannotations in CSS in a way that may disclose local.mapfiles outside the expected directory, including whenopts.fromis unset.This PR is intentionally limited to dependency remediation; it does not change Ionic's application-level CSS processing behavior.
Verification
Before:
After:
Also confirmed via
npm auditthat the postcss-related advisories are cleared (the 2 remaining high-severity findings,brace-expansionandjs-yaml, are unrelated to this change and out of scope).Scope
postcssresolution inpackages/vue-router/package.jsonvia npm's existingoverridesmechanism.packages/vue-router/package-lock.jsonvianpm install(no manual edits).main(this PR was originally opened against a much older base).Note on overlap with #31317
#31317 targets
postcss@8.5.18for the same package boundary (GHSA-r28c-9q8g-f849). Since8.5.18doesn't include the8.5.23opts.fromfix, I'd suggest consolidating: either fold that PR's findings into this one, or close this one in favor of #31317 after bumping its target to8.5.23. Happy to close this PR if maintainers prefer to land the fix there instead — just flagging so we don't end up with two overlapping postcss security PRs.