Why PostCSS stopped loading your source map, and how to fix it
Updated November 27, 2026
On this page
What changed in PostCSS 8.5.23?
PostCSS no longer reads a previous source map from disk unless you tell it where the CSS file is. The 8.5.23 changelog entry is one line: "Do not load source map without opts.from for security reasons." npm lists 8.5.23 as published July 24, 2026.
A previous map is the map an earlier step wrote, such as Sass compiling app.scss to app.css plus app.css.map. PostCSS finds it through the /*# sourceMappingURL=app.css.map */ comment at the end of the CSS and chains it into its own output, so DevTools points at the .scss line instead of the compiled CSS. When it can't load that map, nothing throws. Your output map just points at the CSS PostCSS was given.
8.5.23 is the last of three security rules added to the same code in 2026. Each one closed a way for untrusted CSS to make PostCSS read files from disk, and each one drops a map that used to load:
| Version | New rule | Advisory it fixed |
|---|---|---|
| 8.5.12 (April 26, 2026) | Only files ending in .map load. Added the unsafeMap option to turn the checks off. | GHSA-6g55-p6wh-862q, CVE-2026-45623, high |
| 8.5.18 (July 12, 2026) | The map must be inside the folder of the from file, or below it. | GHSA-r28c-9q8g-f849, CVE-2026-73646, high |
| 8.5.23 (July 24, 2026) | No from, no map file at all. | GHSA-fxqj-rqcc-2cmp, CVE-2026-69153, medium |
8.5.26 (August 6, 2026) tightened the folder rule again: it now compares real paths, so a symlink inside the CSS folder can't point the map outside it.
You may never have chosen to upgrade. A caret range like ^8.5.0 takes every new 8.x minor and patch, so this change can arrive with no edit to package.json, the next time the lockfile is regenerated or a bot bumps PostCSS.
How do you know this is what broke your source map?
Check the sources in the map PostCSS writes. If it lists your .scss or .less file, the previous map loaded. If it lists the compiled CSS file, or the placeholder <no source>, PostCSS skipped it.
- DevTools shows the compiled .css file and line, not the .scss file, after a dependency update.
- The output map's
sourcesarray changed from["app.scss"]to the CSS file's own name. - Your code calls
postcss(plugins).process(css)with a string and nofrom, in a build script, a test, a gulp task or a CMS theme compiler. - No error or warning mentions it. The only warning PostCSS prints about from is the older one covered below, and it doesn't show when NODE_ENV is production.
To confirm the version you have, run npm ls postcss. Several tools bring their own copy, so look for any 8.5.23 or later in the tree, not only the top line.
How do you fix it?
Pass from as the path of the CSS file you're processing, and to as the path you'll write. That's the whole fix for most projects. The PostCSS runner guidelines ask runners to set both, because PostCSS uses them for source maps and error messages.
- Find every
.process(andpostcss.parse(call in your own code. - Add
from: inputPathandto: outputPathwhere the CSS came from a file. Use the real path, relative to the working directory or absolute. - Keep the map file next to the CSS, or in a folder under it, with a name that ends in
.map. - Rebuild and check the output map's
sourceslists your original files again.
Here is the change, run today. A folder holds app.css, with a sourceMappingURL comment, and app.css.map, a map that points back to app.scss:
$ cat app.css
a {
color: red
}
/*# sourceMappingURL=app.css.map */
$ cat app.css.map
{
"version": 3,
"sources": ["app.scss"],
"names": [],
"mappings": "AAAA",
"file": "app.css"
}This script processes app.css with whichever PostCSS you name, with or without from, and prints the sources of the map it writes:
// check.cjs
const fs = require('fs')
const [pkg, from] = process.argv.slice(2)
const postcss = require(pkg)
const css = fs.readFileSync('app.css', 'utf8')
const opts = { to: 'out.css', map: { inline: false } }
if (from) opts.from = from
const r = postcss().process(css, opts).sync()
const map = JSON.parse(r.map.toString())
console.log(postcss().version, map.sources)With 8.5.22 installed as old and 8.5.34, the newest release today, as new (npm i old@npm:postcss@8.5.22 new@npm:postcss@8.5.34), it printed:
$ node check.cjs old
8.5.22 [ 'app.scss' ]
$ node check.cjs new
8.5.34 [ '<no source>' ]
$ node check.cjs new app.css
8.5.34 [ 'app.scss' ]Same CSS, same map file. 8.5.22 loaded it without from, 8.5.34 didn't, and 8.5.34 with from set to app.css loaded it again.
Why is the map still ignored after you set from?
Because the map breaks one of the two older rules: its name doesn't end in .map, or it lives outside the CSS file's folder. Neither prints a warning.
The folder rule catches a common layout: CSS in css/, maps in a sibling maps/ folder, joined by sourceMappingURL=../maps/app.css.map. Since 8.5.18 that map is outside the from folder, so it's skipped even with from set. I ran it today on 8.5.34, once with the default and once with unsafeMap: true:
$ cat css/app.css
a {
color: red
}
/*# sourceMappingURL=../maps/app.css.map */
$ node outside.cjs
{ unsafeMap: false } [ 'css/app.css' ]
{ unsafeMap: true } [ 'app.scss' ]You have three ways to fix it, safest first:
- Move the map next to the CSS (or into a folder under it) and give it a .map name.
- Hand PostCSS the map yourself with
map.prev. A map you pass in is trusted, so the name and folder checks don't apply. You can pass the map's text, a parsed object, or a function that returns its path. - Set
unsafeMap: true. It turns the checks off, so use it only when you wrote every CSS file the process will ever see.
The map.prev version, which printed [ 'app.scss' ] on 8.5.34:
// prev.cjs
const fs = require('fs')
const postcss = require('postcss')
const css = fs.readFileSync('css/app.css', 'utf8')
const prev = fs.readFileSync('maps/app.css.map', 'utf8')
const r = postcss().process(css, {
from: 'css/app.css',
to: 'out.css',
map: { inline: false, prev },
}).sync()
console.log(JSON.parse(r.map.toString()).sources)For the name rule: a map called app.map.json loaded on 8.5.11 and was skipped on 8.5.17, 8.5.22 and 8.5.34 in the same run. Rename it to app.css.map or pass it through map.prev.
Inline maps are not affected. A sourceMappingURL=data:application/json;base64,... comment carries the map inside the CSS, so there's no file to read, and 8.5.34 still loaded one with no from set.
What does "Without `from` option PostCSS could generate wrong source map" mean?
It means you called process() without a from key, and PostCSS is telling you the two things that go wrong without it: source maps and the Browserslist config lookup. It's an older warning than 8.5.23, and the fix is the same: set from.
The full text, printed by PostCSS 8.5.34 today for an awaited process() with no options:
// warn.mjs
import postcss from 'postcss'
const result = await postcss().process('a { color: red }')
console.log(result.css)
$ node warn.mjs
Without `from` option PostCSS could generate wrong
source map and will not find Browserslist config. Set
it to CSS file path or to `undefined` to prevent this
warning.
a { color: red }I wrapped the warning onto four lines here; PostCSS prints it as one. It shows once per process, only when you await the result or call then(), and not at all when NODE_ENV is production.
Setting from: undefined silences it, and that's right when the CSS really has no file, such as a string built in code or sent by a user. Just know what you're opting into: with no from, 8.5.23 and later load no map file, and, as the warning says, Browserslist config won't be found from the file's location. If the CSS came from a file, pass the path instead.
Do Vite, webpack and postcss-cli set from for you?
Yes, the three I checked today all pass the file's path, so a project that only uses them through their config files doesn't need a change. The ones that break are your own calls to process() with a string.
- Vite 8.4.0: its
runPostCSSfunction passesfrom: sourceandto: sourcefor each CSS module (read in the installed package,dist/node/chunks/node.js). - postcss-loader 8.2.2 for webpack: it sets
from: fileandto: filebefore your options (dist/utils.js). Its docs say not to set from, to or map yourself. - postcss-cli 12.0.0:
npx postcss src/app.css -o dist/app.css --mapwrote a map with"sources":["app.scss"]on PostCSS 8.5.34.
Wrappers and plugins that call PostCSS for you are where to look next: a gulp plugin, a static site generator's CSS step, a test helper that compiles a fixture, or a framework adapter you haven't updated. If one of them passes a string with no from, its maps break on 8.5.23 and later until it's fixed upstream or you pass map.prev through its options.
Should you pin PostCSS 8.5.22 to get the old behavior back?
No. 8.5.22 and every earlier release are flagged by npm audit, and the fix is a line of options. Here's npm audit today in a project with postcss@8.5.22 installed (I left out the advisory title line and the closing summary):
$ npm audit
# npm audit report
postcss <=8.5.22
Severity: moderate
fix available via `npm audit fix`
node_modules/postcssThe advisory behind it, GHSA-fxqj-rqcc-2cmp, is about CSS you don't control: a comment like /*# sourceMappingURL=/abs/path/x.map */ made PostCSS read that .map file from anywhere on disk when from was unset. If your build only ever sees your own CSS, the risk was small, but pinning an old version to dodge an options change trades a real fix for a few minutes of work.
If you process CSS from users, themes or third-party packages, go further and set map: false. PostCSS then skips previous maps entirely: on 8.5.34 the result had no map and the input had no previous map attached. The loading code returns before reading any comment when map is false.
Where Since.dev fits
A patch release that changes behavior is the kind of change a version range lets in without anyone noticing. Since.dev lists it: the postcss breaking changes page has 8.5.23 as a behavior change to opts.from, with its source, next to 8.5.18 and the other releases that changed something you might rely on.
For the general method (list the releases in between, read the notes, diff what was published), see how to find breaking changes between two versions and how to check dependencies before you upgrade. To see what a public repository is exposed to, run a free scan, or give your coding agent the same answers through the docs.
When a change like this reaches a repository you connect, Since.dev reports where your code is affected and can open a pull request with the fix for you to review. Nothing merges or deploys on its own.
Questions
What does the from option do in PostCSS?
It tells PostCSS the path of the CSS file it's processing. PostCSS uses it to name the source in source maps and errors, to find a previous source map next to the file, and, as its warning says, to find a Browserslist config. Since PostCSS 8.5.23, a previous map file is only loaded when from is set.
Is it safe to set from to undefined in PostCSS?
Yes. It tells PostCSS the CSS has no file, which silences the warning. Use it when the CSS has no file, such as a string built in code. With from undefined, PostCSS 8.5.23 and later won't load any source map file for that CSS, so pass the real path whenever the CSS came from a file.
What is unsafeMap in PostCSS?
unsafeMap is a process option added in PostCSS 8.5.12 that turns off the safety checks on previous source maps: the .map name rule and the rule that the map sits in the from folder. Set it to true only when every CSS file the process reads is your own. Passing the map through map.prev is the safer way to load a map from somewhere else.
Did PostCSS 8.5.23 break inline source maps?
No. An inline map is a data: URL inside the sourceMappingURL comment, so there's no file to read. PostCSS 8.5.34 still loaded an inline map with no from set in a test run on November 27, 2026.
How do I stop PostCSS from loading previous source maps?
Pass map: false in the process options. PostCSS then ignores any sourceMappingURL comment and writes no map. That's the right setting for CSS from users, themes or other packages.
Which PostCSS version fixes CVE-2026-69153?
PostCSS 8.5.23, published July 24, 2026. GitHub's advisory GHSA-fxqj-rqcc-2cmp lists 8.5.22 and earlier as affected. The fix is the change that stops source maps loading when from is unset.
Related guides
Comparisons
- Dependabot vs Renovate: which should you use?Dependabot vs Renovate on the same criteria: hosts, config, PR limits, automerge, security updates and price, with both configs validated and a dry run.
How-to
- How to find the breaking changes between two versions of a packageHow to find breaking changes between two versions of a package: list the releases in between, read each changelog, diff the code. Commands for npm, PyPI, Go.
- How to check your dependencies for breaking changes before you upgradeHow to check dependencies for breaking changes before upgrading: the commands, a real failing upgrade, CI that fails on deprecations, and where notices appear.
- python-multipart 0.0.20 to 0.0.34: what breaks when you upgradeUpgrading python-multipart from 0.0.20 to 0.0.34? Semicolons stop splitting form fields, Python 3.11 is the floor, and two APIs are gone. Tested side by side.
Explainers
- Caret vs tilde in package.json: what ^ and ~ let inCaret (^) allows minor and patch updates, tilde (~) only patches. The 0.x exception, what your lockfile does, and how ^ and ~ differ in Cargo and Composer.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.