8000 Update dependency postcss to v8.5.23 [SECURITY] by renovate[bot] · Pull Request #623 · noahm/DDRCardDraw · GitHub
[go: up one dir, main page]

Skip to content

Update dependency postcss to v8.5.23 [SECURITY] - #623

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-postcss-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-postcss-vulnerability

Conversation

@renovate
@renovate renovate Bot commented Aug 6, 2026 •
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
postcss (source) 8.5.19 → 8.5.23 age confidence

PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappingURL reads arbitrary .map files when from is unset

CVE-2026-69153 / GHSA-fxqj-rqcc-2cmp

More information

Details

Summary

The fix for GHSA-6g55-p6wh-862q added a guard in lib/previous-map.js PreviousMap.loadFile() that restricts an attacker-controlled sourceMappingURL (from a CSS comment) to a .map extension and, for untrusted maps, rejects .. traversal and absolute paths. The traversal/absolute rejection is nested inside if (cssFile) { ... }. When PostCSS is invoked without the from option, cssFile is falsy and that branch is skipped, leaving only the .map extension check.

PreviousMap is constructed by lib/input.js whenever pathAvailable && sourceMapAvailable (under Node with source-map available), independent of opts.from/opts.map (the constructor returns early only for opts.map === false). So postcss([]).process(css) on attacker CSS reaches loadFile with cssFile undefined, and an attacker /*# sourceMappingURL=/abs/path/x.map */ (or ../-traversing path) is read via readFileSync. When the file is valid JSON, its sources (filesystem paths) and sourcesContent (source contents) are disclosed in the generated source map.

Affected code (v8.5.22 — the release carrying the GHSA-6g55 fix)
// lib/previous-map.js
loadFile(path, cssFile, trusted) {
  if (!trusted && !this.unsafeMap) {
    if (!/\.map$/i.test(path)) {
      return undefined
    }
    if (cssFile) {                       // guard runs ONLY when `from` is set
      let relativePath = relative(dirname(cssFile), path)
      if (relativePath === '..' ||
          relativePath.startsWith('..' + sep) ||
          isAbsolute(relativePath)) {
        return undefined
      }
    }
  }
  this.root = dirname(path)
  if (existsSync(path)) {
    this.mapFile = path
    return readFileSync(path, 'utf-8').toString().trim()   // sink
  }
}

// loadMap(): untrusted annotation path, trusted=false; file === opts.from
} else if (this.annotation) {
  let map = this.annotation
  if (file) map = join(dirname(file), map)   // no `from` -> map stays the raw URL
  let unknown = this.loadFile(map, file, false)  // file undefined -> cssFile falsy
Proof of concept (verified on postcss 8.5.22)
const postcss = require('postcss')
const fs = require('fs')

// a 'secret' sourcemap OUTSIDE any expected tree (stand-in for another project's .map)
const secret = '/tmp/pcpoc/secret_out_of_tree.map'
fs.writeFileSync(secret, JSON.stringify({
  version: 3, sources: ['/etc/REAL_PATH_LEAK'], mappings: '', names: [],
  sourcesContent: ['TOP_SECRET_abcdef']
}))

const css = 'a{color:red}\n/*# sourceMappingURL=' + secret + ' */'
const leaks = m => m && JSON.stringify(m.toJSON ? m.toJSON() : m).includes('TOP_SECRET_abcdef')

;(async () => {
  // A) NO `from`  -> guard skipped -> arbitrary absolute .map read + disclosed
  const a = await postcss([]).process(css, { map: true })
  console.log('no from   -> leaked:', !!leaks(a.map))   // true

  // B) WITH `from` -> guard active -> blocked
  const b = await postcss([]).process(css, { from: '/tmp/pcpoc/in.css', map: true })
  console.log('with from -> leaked:', !!leaks(b.map))    // false
})()

Observed output on postcss 8.5.22:

no from   -> leaked: true      # sourcesContent 'TOP_SECRET_abcdef' AND sources '/etc/REAL_PATH_LEAK' appear in result.map
with from -> leaked: false     # guard rejects the absolute path

../ traversal (no from) also succeeds; non-.map targets (.txt, ?x=.map, #.map) are blocked by the .map check. The tested build contains the GHSA-6g55 fix (this.json = JSON.parse(...) in loadMap, consumer() uses this.json || this.text), so this is a residual of that fix.

Impact

Arbitrary .map-file read (absolute path or ../ traversal) and disclosure of the target map's sources (local filesystem paths) and sourcesContent (source) into the generated source map, for any consumer that runs PostCSS on attacker-influenced CSS without a from option and exposes result.map (online CSS playgrounds, minify/lint services, string-input build steps). Bounded to files ending in .map that parse as JSON.

Suggested fix

Apply the traversal/absolute-path rejection to the untrusted map path regardless of whether cssFile is present (resolve against process.cwd() when there is no cssFile, and reject absolute paths and .. escape in all untrusted cases), or refuse to load an untrusted external map when no base file is known.

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

postcss/postcss (postcss)

v8.5.23

Compare Source

  • Do not load source map without opts.from for security reasons.

v8.5.22

Compare Source

v8.5.21

Compare Source

v8.5.20

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel
vercel Bot commented Aug 6, 2026 •
Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ddr-tools Ready Ready Preview Nov 25, 2026 4:00am UTC

@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from c5c108d to 38704ad Compare August 6, 2026 21:03
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 38704ad to 85ffe03 Compare August 6, 2026 23:35
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 85ffe03 to c062462 Compare August 11, 2026 18:11
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from c062462 to 152bd2b Compare August 13, 2026 05:10
@renovate renovate Bot changed the title chore(deps): update dependency postcss to v8.5.23 [security] Update dependency postcss to v8.5.23 [SECURITY] Aug 13, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 152bd2b to d87aa38 Compare August 13, 2026 20:44
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from d87aa38 to a72509e Compare August 13, 2026 21:53
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from a72509e to 2a1dfff Compare September 1, 2026 17:23
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 2a1dfff to e0bab83 Compare September 1, 2026 21:59
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from e0bab83 to dd2d719 Compare September 4, 2026 15:25
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from dd2d719 to 978ea63 Compare September 8, 2026 00:25
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 978ea63 to 1446b48 Compare September 12, 2026 02:00
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 1446b48 to da813c6 Compare September 13, 2026 21:03
@renovate renovate Bot changed the title Update dependency postcss to v8.5.23 [SECURITY] chore(deps): update dependency postcss to v8.5.23 [security] Sep 13, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from da813c6 to 2dbecd2 Compare September 17, 2026 16:37
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 6bc111d to b8d5b09 Compare October 20, 2026 00:47
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from b8d5b09 to e792ef4 Compare October 20, 2026 17:15
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from e792ef4 to 089710d Compare October 20, 2026 17:32
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 089710d to 1e3db05 Compare October 22, 2026 11:43
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 1e3db05 to 327941f Compare October 23, 2026 18:26
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 327941f to c83b4c1 Compare October 23, 2026 18:31
@renovate renovate Bot changed the title chore(deps): update dependency postcss to v8.5.23 [security] Update dependency postcss to v8.5.23 [SECURITY] Oct 23, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from c83b4c1 to 45747c7 Compare October 26, 2026 14:44
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 45747c7 to 116f47f Compare October 28, 2026 00:08
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 116f47f to 726ef62 Compare October 29, 2026 05:43
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 726ef62 to b0cbf07 Compare October 30, 2026 05:20
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from b0cbf07 to c50eca2 Compare October 30, 2026 21:45
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from c50eca2 to 4f01184 Compare November 17, 2026 01:12
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 4f01184 to 61cc7db Compare November 20, 2026 04:41
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 61cc7db to f274ab4 Compare November 25, 2026 03:34

This branch was successfully deployed

1 active deployment
Preview — 532852a6 Deployed Nov 25, 2026 by vercel[bot]
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.

0 participants

0