chore(deps): update dependency postcss to v8.5.12 [security] - #394
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency postcss to v8.5.12 [security]#394renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
October 31, 2024 14:54
b990a6d to
89d1995
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
3 times, most recently
from
December 12, 2024 11:07
188158b to
d63ddcd
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
January 30, 2025 17:38
dfa50d4 to
0c8b73c
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
February 9, 2025 13:36
0c8b73c to
ebf88e6
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
3 times, most recently
from
March 3, 2025 12:53
39c387d to
6999592
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
3 times, most recently
from
March 17, 2025 18:16
9a3d61f to
10bca53
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
April 1, 2025 10:49
a4ba92a to
60e24d1
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
April 8, 2025 11:28
60e24d1 to
7300042
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
April 24, 2025 10:28
7300042 to
39f09fb
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
May 23, 2025 15:39
7a20c12 to
e3c635e
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
May 28, 2025 07:39
a61a566 to
ee5575f
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
June 9, 2025 10:59
4829b5e to
48d4609
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
June 19, 2025 07:36
48d4609 to
6a9c01d
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
October 23, 2025 13:22
c915218 to
c299e46
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
November 11, 2025 14:47
c299e46 to
f9b8621
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
December 3, 2025 13:46
50944eb to
a23afbc
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
December 31, 2025 16:34
a23afbc to
5cb1c46
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
January 19, 2026 16:28
5cb1c46 to
4bc7eae
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
February 2, 2026 20:55
4bc7eae to
7034e67
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
February 12, 2026 14:00
7034e67 to
6e29145
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
March 5, 2026 15:34
6e29145 to
cc92fd7
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
March 30, 2026 17:59
cc92fd7 to
58a525d
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
April 8, 2026 19:43
58a525d to
55c5321
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
April 27, 2026 23:48
55c5321 to
a13b6f6
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
May 9, 2026 21:11
a13b6f6 to
d9cc6f9
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
May 28, 2026 13:59
d9cc6f9 to
6ec8d98
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
from
June 13, 2026 15:45
6ec8d98 to
7e45dd8
Compare
renovate
Bot
force-pushed
the
renovate/npm-postcss-vulnerability
branch
2 times, most recently
from
July 17, 2026 09:15
f1ce57c to
1d19196
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
8.4.21→8.5.12PostCSS line return parsing error
CVE-2023-44270 / GHSA-7fh5-64p2-3v2j
More information
Details
An issue was discovered in PostCSS before 8.4.31. It affects linters using PostCSS to parse external Cascading Style Sheets (CSS). There may be
\rdiscrepancies, as demonstrated by@font-face{ font:(\r/*);}in a rule.This vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being originally included in a comment.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
CVE-2026-41305 / GHSA-qx2v-qp2m-jg93
More information
Details
PostCSS: XSS via Unescaped
</style>in CSS Stringify OutputSummary
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
Tested output (Node.js v22, postcss v8.5.5):
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
</stylein all stringified output values:Credits
Discovered and reported by Sunil Kumar (@TharVid)
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments
CVE-2026-45623 / GHSA-6g55-p6wh-862q
More information
Details
Summary
PostCSS's
PreviousMapparses the/*# sourceMappingURL=PATH */comment from any CSS string passed toprocess()and dereferencesPATHagainst the local filesystem with no scheme, allowlist, or traversal check. An attacker who controls the CSS input can cause the host process to read any file readable by Node and leak the first ~10 bytes of its content through the resultingJSON.parseSyntaxErrormessage. The bug also yields a precise file-existence oracle and a controllable-read primitive that may be combined with large-file targets for DoS. The behaviour is triggered with PostCSS's default options — nofrom, nomap, no plugins required — and is therefore reachable from any pipeline that runs untrusted CSS through PostCSS (CMS themes, user-uploaded styles, browser-extension/userstyle processors, build pipelines for third-party packages, blog comment renderers, etc.).Details
The dangerous chain lives in
lib/previous-map.jsand is wired into everyInputconstruction atlib/input.js:70-77.Inputconstructor (lib/input.js:70-77):PreviousMapconstructor (lib/previous-map.js:17-29):Note
opts.map === falseis the only short-circuit. With default options (opts.map === undefined), the rest of the constructor — including the filesystem read — executes.loadAnnotation(lib/previous-map.js:72-84) extracts the URL without sanitisation:getAnnotationURL(lib/previous-map.js:59-61) only strips the/*# sourceMappingURL=prefix and trims whitespace — no scheme check, no path normalisation, no allowlist.loadMap(lib/previous-map.js:124-128) — whenprevis absent and the annotation is not an inlinedata:URI:opts.fromis unset,fileis undefined and the raw attacker-supplied path (e.g./etc/passwd) is used directly.opts.fromis set,path.join(dirname(file), attackerPath)is used.path.joindoes not block..segments, so../../../../../etc/passwdresolves outside the intended directory.loadFile(lib/previous-map.js:86-92) is the sink:The bytes are stored in
this.text.Inputimmediately invokesmap.consumer()(lib/input.js:74), which constructs aSourceMapConsumer(lib/previous-map.js:33). When the file is not valid source-map JSON (the common case),source-map-jscallsJSON.parse, and V8'sSyntaxErrormessage embeds the first ~10 bytes of the file content:This error is propagated back to the caller. Any application that surfaces PostCSS errors (logs, HTTP 500 responses, build-tool output, debug pages) discloses those bytes to the attacker.
Trust-boundary analysis:
postcss().process(css, opts?)./etc/passwd,/proc/self/environ, etc.startWith(annotation, 'data:')) routes inline URIs todecodeInline; everything else hitsloadFile.Primitives obtained:
JSON.parseSyntaxErrormessage.loadFile(existsSyncis false → returns undefined → no map text → no consumer call → no error). Existent non-JSON paths throw. Existent JSON paths succeed silently. Three distinguishable states./dev/zero, very large files, or device files can stall or crash the process.PoC
All commands executed against this repository's HEAD (postcss 8.5.10) on Node v22.12.0.
Vector 1 — Absolute path, default options (no
from, nomap):The first 10 bytes of
/etc/passwd(root:x:0:0) are leaked.Vector 2 — Relative
..traversal withopts.fromset (simulates a build pipeline that pinsfromto the source file):path.join('/var/www/html/styles', '../../../../../etc/passwd')resolves to/etc/passwd.Vector 3 — File-existence oracle:
Vector 4 — Custom file-content leak:
The first 10 bytes of
/tmp/server-secret.env(API_KEY=sk) are leaked — sufficient to confirm a token's presence and, in many cases, recover its prefix.Filesystem-call trace (proves the read happens with no opts at all):
Impact
postcss-loader, vite, parcel, Next.js, Gatsby, etc.) and for runtime CSS-handling libraries (CSS Modules tools, CSS minifiers, theme processors). Any pipeline that runs untrusted user CSS — CMS theme uploads, user-styled blog posts, browser-extension/userstyle services, multi-tenant build farms, third-party-package build pipelines — is exposed.JSON.parseSyntaxError. This is enough to recover SSH-key headers, environment-variable prefixes (API_KEY=sk…),/etc/passwdrecords, the start of/proc/self/environ, and other high-value secrets, and to fingerprint the host (Debian-tri…from/etc/hostname).JSON.parseerror, no-such-file silence), enabling reconnaissance of the host filesystem layout and confirmation of installed software, user accounts, and configuration files./dev/zero,/proc/kcore, very large files, or named pipes —readFileSyncis a synchronous, unbounded read.postcss().process(css)and no options. The only configuration that disables the bug is the explicit, undocumented-for-this-purpose{ map: false }.Recommended Fix
The root cause is that
loadFileaccepts any path the attacker supplies inside a CSS comment. The annotation is meant for tooling, not for production CSS processing of untrusted input. Two layered fixes:Refuse traversal/absolute paths in
loadMap(defence-in-depth):Require explicit opt-in to follow on-disk source-map annotations: gate the
loadFile(map)call inloadMapbehind an option such asopts.map.annotation === trueoropts.map.followAnnotation === true. Today, the only way to opt out is{ map: false }, which also disables in-memory previous-map handling. Inverting the default — only follow disk-resident annotations when explicitly asked — eliminates the entire attack surface for callers that pass untrusted CSS, while preserving build-tool use cases where the annotation is trusted.A user-facing changelog entry should warn that
postcss().process(untrustedCss)previously read attacker-controlled paths, and recommend auditing applications that surfaced PostCSS errors to end users.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
postcss/postcss (postcss)
v8.5.12Compare Source
opts.unsafeMapto disable checks.v8.5.11Compare Source
v8.5.10Compare Source
</style>in non-bundler cases (by @TharVid).v8.5.9Compare Source
v8.5.8Compare Source
Processor#version.v8.5.7Compare Source
v8.5.6Compare Source
ContainerWithChildrentype discriminating (by @Goodwine).v8.5.5Compare Source
package.json→exportscompatibility with some tools (by @JounQin).v8.5.4Compare Source
v8.5.3Compare Source
Unknown worderror (by @hiepxanh).v8.5.2Compare Source
v8.5.1Compare Source
v8.5.0: 8.5 “Duke Alloces”Compare Source
PostCSS 8.5 brought API to work better with non-CSS sources like HTML, Vue.js/Svelte sources or CSS-in-JS.
@romainmenke during his work on Stylelint added
Input#documentin additional toInput#css.Thanks to Sponsors
This release was possible thanks to our community.
If your company wants to support the sustainability of front-end infrastructure or wants to give some love to PostCSS, you can join our supporters by:
v8.4.49Compare Source
source.offset(by @romainmenke).v8.4.48Compare Source
v8.4.47Compare Source
v8.4.46Compare Source
Cannot read properties of undefined (reading 'before').v8.4.45Compare Source
v8.4.44Compare Source
markClean is not a functionerror.v8.4.43Compare Source
markClean is not a functionerror.v8.4.42Compare Source
v8.4.41Compare Source
v8.4.40Compare Source
v8.4.39Compare Source
CssSyntaxErrortypes (by @romainmenke).v8.4.38Compare Source
endIndex: 0in errors and warnings (by @romainmenke).v8.4.37Compare Source
original.column are not numberserror in another case.v8.4.36Compare Source
original.column are not numberserror on broken previous source map.v8.4.35Compare Source
!innode.parent.nodestype.undefinedto node adding method to simplify types.v8.4.34Compare Source
AtRule#nodestype (by Tim Weißenfels).v8.4.33Compare Source
NoWorkResultbehavior difference with normal mode (by Romain Menke).NoWorkResultusage conditions (by @ahmdammarr).v8.4.32Compare Source
postcss().process()types (by Andrew Ferreira).v8.4.31Compare Source
\rparsing to fix CVE-2023-44270.v8.4.30Compare Source
v8.4.29Compare Source
Node#source.offset(by Ido Rosenthal).v8.4.28Compare Source
Root.source.endfor better source map (by Romain Menke).Result.roottypes whenprocess()has no parser.v8.4.27Compare Source
Containerclone methods types.v8.4.26Compare Source
v8.4.25Compare Source
v8.4.24Compare Source
Plugintypes.v8.4.23Compare Source
v8.4.22Compare Source
node16(by Remco Haszing).Configuration
📅 Schedule: (in timezone Europe/Prague)
🚦 Automerge: Enabled.
♻ 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.
This PR was generated by Mend Renovate. View the repository job log.