Skip to content

🚨 [security] Update postcss 8.5.6 β†’ 8.5.10 (patch)#19967

Closed
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/postcss-8.5.10
Closed

🚨 [security] Update postcss 8.5.6 β†’ 8.5.10 (patch)#19967
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/postcss-8.5.10

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu Bot commented Apr 24, 2026


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ postcss (8.5.6 β†’ 8.5.10) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 PostCSS has XSS via Unescaped </style> in its CSS Stringify Output

PostCSS: XSS via Unescaped </style> in CSS Stringify Output

Summary

PostCSS v8.5.5 (latest) does not escape </style> sequences when stringifying CSS ASTs. When user-submitted CSS is parsed and re-stringified for embedding in HTML <style> tags, </style> in CSS values breaks out of the style context, enabling XSS.

Proof of Concept

const postcss = require('postcss');

// Parse user CSS and re-stringify for page embedding
const userCSS = 'body { content: "</style><script>alert(1)</script><style>"; }';
const ast = postcss.parse(userCSS);
const output = ast.toResult().css;
const html = &lt;style&gt;<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">output</span><span class="pl-kos">}</span></span>&lt;/style&gt;;

console.log(html);
// <style>body { content: "</style><script>alert(1)</script><style>"; }</style>
//
// Browser: </style> closes the style tag, <script> executes

Tested output (Node.js v22, postcss v8.5.5):

Input: body { content: "</style><script>alert(1)</script><style>"; }
Output: body { content: "</style><script>alert(1)</script><style>"; }
Contains </style>: true

Impact

Impact non-bundler use cases since bundlers for XSS on their own. Requires some PostCSS plugin to have malware code, which can inject XSS to website.

Suggested Fix

Escape </style in all stringified output values:

output = output.replace(/<\/(style)/gi, '<\\/$1');

Credits

Discovered and reported by Sunil Kumar (@TharVid)

Release Notes

8.5.10

  • Fixed XSS via unescaped </style> in non-bundler cases (by @TharVid).

8.5.9

  • Speed up source map encoding paring in case of the error.

8.5.8

  • Fixed Processor#version.

8.5.7

  • Improved source map annotation cleaning performance (by CodeAnt AI).

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 37 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu Bot requested a review from a team as a code owner April 24, 2026 16:08
@depfu depfu Bot added the depfu label Apr 24, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Walkthrough

This change updates the postcss development dependency from version 8.5.6 to 8.5.10 in the package.json file. The update represents a patch-level version increase within the same minor version series. No other dependencies, configuration settings, or scripts are modified in this change.

πŸš₯ Pre-merge checks | βœ… 4
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly identifies the main change: upgrading postcss from 8.5.6 to 8.5.10 and indicates it addresses security vulnerabilities.
Description check βœ… Passed The description is directly related to the changeset, providing detailed security context, advisory information, and release notes for the postcss upgrade.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

πŸ€– Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 50-54: The lockfile contains mixed postcss versions causing CI to
install 8.5.6; regenerate the pnpm lockfile so postcss is consistently 8.5.10
and postcss-import resolves to the same version. Run the appropriate lock
regeneration (e.g., remove/refresh pnpm-lock.yaml and run pnpm install) ensuring
package.json's devDependencies entries for "postcss" and "postcss-import"
resolve to postcss@8.5.10, then commit the updated pnpm-lock.yaml so CI uses the
updated dependency tree.
πŸͺ„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0f5e2615-d5a0-43ed-aa18-9858a6cf577d

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between db27049 and da86009.

β›” Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
πŸ“’ Files selected for processing (1)
  • package.json

Comment thread package.json
Comment on lines 50 to 54
"devDependencies": {
"@playwright/test": "^1.58.0",
"@types/node": "catalog:",
"postcss": "8.5.6",
"postcss": "8.5.10",
"postcss-import": "^16.1.1",
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

if [ -f pnpm-lock.yaml ]; then
  echo "Found pnpm-lock.yaml"
  echo "Checking for postcss resolved version 8.5.10..."
  # Look for the actual resolved package entry
  rg -n "postcss@8\.5\.10" pnpm-lock.yaml || {
    echo "ERROR: Could not find postcss@8.5.10 in pnpm-lock.yaml"
    exit 1
  }

  # Also ensure there's no lingering postcss@8.5.6
  rg -n "postcss@8\.5\.6" pnpm-lock.yaml && {
    echo "ERROR: Found postcss@8.5.6 in pnpm-lock.yaml"
    exit 1
  } || true
else
  echo "ERROR: pnpm-lock.yaml not found; cannot verify resolution."
  exit 1
fi

Repository: tailwindlabs/tailwindcss

Length of output: 1321


Lockfile must be regenerated to fully update postcss to 8.5.10.

The pnpm-lock.yaml contains both postcss@8.5.10 and lingering entries of postcss@8.5.6 (including postcss-import@16.1.1(postcss@8.5.6)). CI will install the old 8.5.6 version unless the lockfile is regenerated.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 50 - 54, The lockfile contains mixed postcss
versions causing CI to install 8.5.6; regenerate the pnpm lockfile so postcss is
consistently 8.5.10 and postcss-import resolves to the same version. Run the
appropriate lock regeneration (e.g., remove/refresh pnpm-lock.yaml and run pnpm
install) ensuring package.json's devDependencies entries for "postcss" and
"postcss-import" resolve to postcss@8.5.10, then commit the updated
pnpm-lock.yaml so CI uses the updated dependency tree.

@depfu
Copy link
Copy Markdown
Contributor Author

depfu Bot commented Apr 24, 2026

Sorry, but the merge failed with:

At least 1 approving review is required by reviewers with write access.

@RobinMalfait RobinMalfait mentioned this pull request Apr 24, 2026
@depfu depfu Bot deleted the depfu/update/pnpm/postcss-8.5.10 branch April 24, 2026 19:21
pull Bot pushed a commit to steinsi/Tailwind that referenced this pull request Apr 24, 2026
This PR bumps dependencies in all the packages, typically just bumping
to the latest patch release.


Closes: tailwindlabs#19936
Closes: tailwindlabs#19917
Closes: tailwindlabs#19899
Closes: tailwindlabs#19897
Closes: tailwindlabs#19845
Closes: tailwindlabs#19832
Closes: tailwindlabs#19967
Closes: tailwindlabs#19968 

## Test plan

1. All tests still pass
2. All integration tests still pass

[ci-all] to verify Linux, Windows and macOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants