Skip to content

Track upstream fix for Next bundled PostCSS advisory #7

Description

@baixiangcpp

Context

After PR #6, production dependency audit is gated in CI with:

npm run check:audit:prod-high

That gate passes and there are currently 0 high and 0 critical production advisories.

The remaining production audit finding is a moderate advisory inherited from Next.js bundling PostCSS:

  • Advisory: GHSA-qx2v-qp2m-jg93
  • Package: postcss
  • Vulnerable range: <8.5.10
  • Installed path: node_modules/next/node_modules/postcss
  • Current bundled version from next@16.2.9: postcss@8.4.31
  • npm audit relationship: next -> postcss
  • Current npm audit metadata: 2 moderate, 0 high, 0 critical production vulnerabilities

Why this was not fixed in PR #6

As of 2026-06-18, the latest stable next version available to this project is 16.2.9, and it still depends on postcss@8.4.31.

npm audit fix --force suggests installing next@9.3.3, which is a major breaking downgrade and is not an acceptable remediation path for this app.

Risk Boundary

The advisory is for PostCSS stringification of CSS containing an unescaped </style> sequence. In this app, the vulnerable copy is bundled under Next internals rather than a direct application dependency. We should keep it visible and tracked, but avoid forcing an unsafe framework downgrade.

Remediation Plan

  • Monitor Next.js releases for a stable version that updates the bundled PostCSS dependency to >=8.5.10.
  • When available, upgrade next and @next/bundle-analyzer together.
  • Re-run dependency installation with the project-supported toolchain: Node 20.x and npm 10.x.
  • Re-run audit and the full CI-equivalent validation suite.
  • Remove this issue only after npm audit --omit=dev --json reports 0 moderate/high/critical production vulnerabilities, or after a documented upstream/non-applicable determination.

Acceptance Criteria

  • npm audit --omit=dev --json no longer reports next -> postcss.
  • npm run check:audit:prod-high passes.
  • npm run lint passes.
  • npm test passes.
  • npm run validate passes.
  • npm run build:app passes.
  • npm run build:post passes.
  • npm run test:e2e:smoke passes.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions