Skip to content

fix(docs): bump postcss to 8.5.25 to patch source-map path traversal - #6156

Merged
AviPeltz merged 1 commit into
mainfrom
postcss-security-fix
Aug 4, 2026
Merged

AviPeltz merged 1 commit into
mainfrom
postcss-security-fix

Conversation

@AviPeltz

@AviPeltz AviPeltz commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Bump postcss devDependency in apps/docs/package.json from 8.5.18 → 8.5.25 (latest), which includes the 8.5.23 security patch.

Why / Context

Fixes Dependabot alert #259 (GHSA-fxqj-rqcc-2cmp, CVE-2026-69153, medium severity).

The earlier fix for GHSA-6g55-p6wh-862q added a guard in previous-map.js that rejects absolute paths / .. traversal in an attacker-controlled sourceMappingURL — but that guard only runs when opts.from is set. When PostCSS is invoked without from, the guard is skipped, so a crafted /*# sourceMappingURL=... */ comment could still make PostCSS read an arbitrary .map file off disk and leak its sources/sourcesContent into the generated map. Fixed upstream in 8.5.23.

Manual QA Checklist

Testing

  • bun install (lockfile updated cleanly)
  • bun run typecheck (apps/docs)
  • bun run lint (root)

Known Limitations

  • Transitive postcss@8.5.18/8.4.31 copies still exist elsewhere in the tree (via @tailwindcss/postcss, vite, @expo/metro-config, next), but Dependabot isn't currently flagging those as separate alerts, so they're out of scope for this fix.

Summary by cubic

Bump postcss in apps/docs from 8.5.18 to 8.5.25 to patch the source-map path traversal vulnerability and resolve Dependabot alert #259 (GHSA-fxqj-rqcc-2cmp / CVE-2026-69153). Lockfile updated.

Written for commit 3eaeb06. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Updated the PostCSS development tooling to a newer version.

Dependabot alert #259 (GHSA-fxqj-rqcc-2cmp, CVE-2026-69153): postcss's
fix for the earlier sourceMappingURL traversal advisory only guarded
the path when `from` is set. Without `from`, an attacker-controlled
CSS comment could still read arbitrary .map files off disk. Fixed
upstream in 8.5.23; bumped the apps/docs devDependency to the latest
8.5.25.

Claude-Session: https://claude.ai/code/session_01GQgoTe37smR8xJDSr6mVYJ
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR upgrades the docs application's direct PostCSS dependency to 8.5.25 and updates Bun's dependency resolutions to incorporate the patched release.

  • Updates apps/docs from PostCSS 8.5.18 to 8.5.25.
  • Refreshes the top-level PostCSS and Nano ID lockfile resolution while preserving scoped transitive copies required elsewhere in the workspace.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable regressions identified in the dependency bump or lockfile update.

The docs manifest and lockfile consistently resolve the direct PostCSS dependency to 8.5.25, and the retained scoped 8.5.18 entries do not execute on the reviewed docs PostCSS processing path.

Important Files Changed

Filename Overview
apps/docs/package.json Upgrades the docs app's direct PostCSS development dependency to the patched 8.5.25 release.
bun.lock Resolves the direct PostCSS dependency to 8.5.25 and records the resulting scoped transitive resolutions without exposing a concrete docs-path regression.

Reviews (1): Last reviewed commit: "fix(docs): bump postcss to 8.5.25 to pat..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9f02988-fca9-4750-9519-649cbfb91dcd

📥 Commits

Reviewing files that changed from the base of the PR and between 198f76a and 3eaeb06.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • apps/docs/package.json

📝 Walkthrough

Walkthrough

The docs application updates its postcss development dependency from 8.5.18 to 8.5.25.

Changes

PostCSS dependency update

Layer / File(s) Summary
Update PostCSS version
apps/docs/package.json
The postcss development dependency changes from 8.5.18 to 8.5.25.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: saddlepaddle

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and clearly identifies the PostCSS security update in the docs package.
Description check ✅ Passed The description explains the change, security context, testing performed, and known limitations with sufficient detail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch postcss-security-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant Docs as apps/docs
    participant PostCSS as PostCSS (8.5.25)
    participant SourceMap as Source Map Parser
    participant FileSystem as File System

    Note over Dev,FileSystem: PostCSS source-map path traversal fix flow

    Dev->>Docs: Run build with postcss
    Docs->>PostCSS: Invoke process() with CSS + sourceMappingURL comment

    alt PostCSS invoked WITH opts.from set
        PostCSS->>SourceMap: Parse sourceMappingURL comment
        SourceMap->>SourceMap: CHANGED: Validate source map path (reject absolute/.. traversal)
        alt Path is valid
            SourceMap->>FileSystem: Read .map file
            FileSystem-->>SourceMap: Map content
            SourceMap-->>PostCSS: Return parsed source map
            PostCSS->>PostCSS: Merge sources/sourcesContent into output
        else Path is malicious (e.g., ../../../etc/passwd.map)
            SourceMap-->>PostCSS: Return empty/cached fallback
            PostCSS-->>Docs: Generate output without leaked source data
        end
    else PostCSS invoked WITHOUT opts.from
        alt PostCSS 8.5.18 (vulnerable)
            PostCSS->>SourceMap: Parse sourceMappingURL comment
            SourceMap->>SourceMap: Skip path validation (guard not executed)
            SourceMap->>FileSystem: Read arbitrary .map file from disk
            FileSystem-->>SourceMap: Leaked file contents
            SourceMap-->>PostCSS: Return parsed source map with sensitive data
            PostCSS-->>Docs: Generate output with leaked sources
        else PostCSS 8.5.25 (fixed)
            PostCSS->>SourceMap: Parse sourceMappingURL comment
            SourceMap->>SourceMap: NEW: Always validate source map path (even without from)
            alt Path is malicious
                SourceMap-->>PostCSS: Return empty/cached fallback
                PostCSS-->>Docs: Generate output without leaked source data
            else Path is valid
                SourceMap->>FileSystem: Read .map file
                FileSystem-->>SourceMap: Map content
                SourceMap-->>PostCSS: Return parsed source map
                PostCSS-->>Docs: Generate output with valid sources
            end
        end
    end
Loading

Re-trigger cubic

@AviPeltz
AviPeltz merged commit c1f408b into main Aug 4, 2026
19 checks passed

This branch was previously deployed

1 inactive deployment
preview — 3eaeb06b Deployed Aug 4, 2026 by AviPeltz via Deploy Docs #7056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant