security: bump postcss from 8.5.6 to 8.5.10 (GHSA-qx2v-qp2m-jg93)#98
security: bump postcss from 8.5.6 to 8.5.10 (GHSA-qx2v-qp2m-jg93)#98barretts wants to merge 1 commit into
Conversation
- Add yarn resolution for postcss >=8.5.10 to fix XSS vulnerability (CVE-2026-41305) where unescaped </style> in CSS stringify output enables script injection when user CSS is embedded in HTML - postcss is a transitive dep via vite; resolution forces the patched version across the tree - Add security regression test verifying </style> escaping - Validation: lint (exit 0), build (exit 0), test 11/11 passing (exit 0) Refs: GHSA-qx2v-qp2m-jg93 AT: babysit-2026-04-25-01-47-17
|
Grackle review -- postcss 8.5.6 -> 8.5.10 security resolution (GHSA-qx2v-qp2m-jg93) VerificationFindingsLOW #1 -- Security test assertion may be too strict for postcss escaping strategy HYPOTHESIS: The test at tests/postcss_security_test.js:9 asserts output does not include literal '</style>'. The upstream fix may use escaping (e.g. \3c/style>) rather than removal. If postcss escapes rather than strips, the test passes because the literal substring is absent. Refutation: run Verified location: LOW #2 -- Resolution pin at >=8.5.10 allows future major bumps VERIFIED: package.json:90 uses Verified location: What's solid
Priority stack for the authorNo blockers. If CI is available, confirm the security test passes; otherwise this is ready to merge as-is. Recommendation: GO skill-sig: 26cfcbaf · 3pp-skill-sig: ad61853a |
8a9f560b)Summary
Fixes 1 moderate severity 3PP vulnerability in
postcss(GHSA-qx2v-qp2m-jg93 / CVE-2026-41305).PostCSS v8.5.6 is vulnerable to XSS via unescaped
</style>in CSS stringify output. When user-submitted CSS is parsed and re-stringified for embedding in HTML<style>tags, a</style>sequence in CSS values breaks out of the style context, enabling script injection. Fix landed in postcss 8.5.10.Production risk: Build-time only
postcssis a transitive dependency ofvite, which is declared underdevDependencies. It is executed duringyarn build/yarn devand not loaded by any production runtime surface shipped by this package.Strategy: override
Changes
package.json
Added one entry to the existing
resolutionsblock:Why override (via
resolutions) instead of upgrading a direct dependency?postcssis not a direct dependency. It is pulled in transitively byvite(devDependency). Upgradingvitedoes not re-resolve its locked transitives -- the lockfile still pinnedpostcss@8.5.6. A yarnresolutionsentry forces lockfile resolution to>=8.5.10across every path that asks for postcss, which is the minimum change that eradicates the vulnerable version from the tree. A floor (>=8.5.10) rather than a hard pin lets the tree pick up future patch releases without a follow-up override bump.tests/postcss_security_test.js
Added a regression test that exercises the exact stringify path flagged by the advisory. It parses CSS containing a
</style>sequence inside a declaration value and asserts the stringified output does not close the HTML<style>context. The test will fail if any future lockfile regression reintroduces a pre-8.5.10 postcss build.Why add a test for a build-time-only vuln? The test documents the invariant and makes the regression detectable in CI even though the production runtime does not parse untrusted CSS. It is cheap (<10 lines) and closes the loop on the advisory.
yarn.lock
Re-resolved.
postcss@8.5.6replaced withpostcss@8.5.10. No other resolutions moved.README.md
Dependency Override Registry entry added documenting the new
postcssoverride with rationale and a concrete,yarn why-checkable removal statement (see "When to Remove" column in the registry table).Resolutions and overrides
postcss>=8.5.10vite(devDependency).vitedeclares a postcss range that admits 8.5.10+, but the yarn lockfile froze at 8.5.6 (vulnerable). Direct upgrade ofvitedoes not re-resolve its locked transitives. Globalresolutionsforces yarn to pick up the patched version across every path.yarn why postcss; remove whenviteupdates and re-resolvespostcssto>=8.5.10naturally (its range already admits the fix -- the blocker is the stale lockfile entry, not a parent range).How to test
The affected surface is postcss's CSS stringify path, exercised indirectly whenever
vite buildorvite devprocesses CSS. Reproduction / verification steps:Downstream consumers of this package do not need to change anything:
postcssis not a public export surface and does not ship at runtime.Risk Classification
devDependenciesand its parents are build tools (webpack, babel, ember-cli, vite)This fix is Build-time only.
postcssreaches the tree only viavite(devDependency). No production code path loads it.Vulnerabilities Fixed
>=8.5.10>=8.5.10Validation
yarn install --frozen-lockfile.logs/babysit-rebody-validate-1777137925.logyarn lint.logs/babysit-rebody-validate-1777137925.logyarn build.logs/babysit-rebody-validate-1777137925.logyarn test.logs/babysit-rebody-validate-1777137925.logAll pre-existing tests pass. New
tests/postcss_security_test.jsregression test passes. No baseline regressions.Notes
react-malibu -> vite (devDep) -> postcss.viteis devDependency-only; no production runtime loads postcss.>=8.5.10) will naturally absorb future patch releases;3pp-override-maintenancecan prune the entry onceyarn why postcssshows the tree resolves to>=8.5.10without the resolution entry.skill-sig:
26cfcbaf· grackle-sig:8a9f560b· 3pp-skill canonical pipeline · 3pp-grackle babysit