Skip to content

fix: Patch moderate severity XSS vulnerability in postcss (<8.5.10)#4858

Merged
JhaSourav07 merged 7 commits into
JhaSourav07:mainfrom
Kokila-chandrakar:fix/postcss-xss-vulnerability
Jun 12, 2026
Merged

fix: Patch moderate severity XSS vulnerability in postcss (<8.5.10)#4858
JhaSourav07 merged 7 commits into
JhaSourav07:mainfrom
Kokila-chandrakar:fix/postcss-xss-vulnerability

Conversation

@Kokila-chandrakar

Copy link
Copy Markdown
Contributor

Description

Fixes #4840

Resolves a moderate severity Cross-Site Scripting (XSS) vulnerability in postcss versions <8.5.10, where unescaped </style> tags in CSS stringify output could be exploited.

Changes

  • Bumped postcss devDependency from ^8.5.9 to ^8.5.10
  • Added overrides in package.json to enforce postcss >= 8.5.10 across the dependency tree
  • Updated nested next/node_modules/postcss from 8.4.31 to 8.5.15 in package-lock.json

Why overrides?

Next.js includes its own internal copy of PostCSS (8.4.31), which was also affected. The overrides field ensures a patched version is used throughout the entire dependency tree.

Testing

  • Verified npm audit reports no moderate/high PostCSS vulnerabilities
  • Existing test suite remains unaffected (npm test)

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

@Kokila-chandrakar is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🚨 Hey @Kokila-chandrakar, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 7, 2026
@github-actions github-actions Bot added type:bug Something isn't working as expected and removed status:blocked This PR is blocked due to a failing CI check. labels Jun 7, 2026
@Aamod-Dev Aamod-Dev added level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. GSSoC 2026 mentor:Aamod007 labels Jun 11, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great catch! Patching the PostCSS XSS vulnerability is critical for maintaining project security. Approving!

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good work on this one. I reviewed the diff and it looks ready to go from my side.

Merging this looks safe. Approved!

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution. I went through the changes and the overall approach looks good, but there are a few issues that should be addressed before this can be merged. Most of the concerns are related to correctness and maintainability.

  • There are merge conflicts with the base branch. Please resolve them to ensure existing functionality isn't broken.

Once these issues are addressed, I'll be happy to take another look. Thanks again for the contribution.

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution. It looks like there are merge conflicts with the base branch. Please rebase and resolve the conflicts so we can proceed with testing and merging. Thanks!

@Kokila-chandrakar

Copy link
Copy Markdown
Contributor Author

Rebased and resolved all conflicts with upstream main. Ready for re-review. Thanks!

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for resolving the merge conflicts! Approving.

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 12, 2026
@JhaSourav07 JhaSourav07 merged commit 07a76b5 into JhaSourav07:main Jun 12, 2026
5 of 6 checks passed
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @Kokila-chandrakar! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@JhaSourav07 JhaSourav07 removed the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 17, 2026
@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points gssoc:needs-rebase GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: Moderate XSS Vulnerability in PostCSS dependency

3 participants