npm audit says my framework has a vulnerability. How do you decide whether it affects you?
My app runs on Next.js. During a merge, the build printed a notice that my version is affected by a known security vulnerability. It named no advisory, and I’m not an engineer, so my first instinct was to run whatever upgrade command it suggested. I didn’t. The notice came from build output, not from me, so I treated it as information and had Claude Code investigate read-only first.
What it found: I was on Next.js 16.4.2, and npm audit listed two moderate advisories, both fixed in 16.4.5 or later. Both are cache leaks between users in Next’s newer caching system. One needs a “use cache” function called through unstable_cache() on a site that uses root params. The other needs nested “use cache” functions whose stream metadata arrives late. A repo-wide search for unstable_cache, “use cache”, cacheComponents, cacheLife, cacheTag and root params found nothing, and the app has no locale-style routes. So the practical risk was very low.
The fix was still small. The newest 16.4.x is 16.4.6, same major version and the same React requirement. In a throwaway copy, only two lines in package.json changed (next and eslint-config-next), plus the Next packages in the lockfile, and npm audit no longer listed next. The flagged total went from 33 packages to 32.
The weak spots. A search shows my code doesn’t use the feature. It doesn’t prove that no dependency does, and I’m relying on the advisory text for what “affected” means. I compared the new version’s dependency lists from the registry, not its code, so I checked the upgrade on a preview build before it goes live. And the 32 other flagged packages are mostly dev tools and a service-worker build package. Fixing them needs bigger version jumps, so I left them as a separate job.
How do you triage audit warnings: patch everything that has a fix, check each advisory against your own usage first, or ignore anything that isn’t high severity?
p/runevr
p/producthunt
p/google-cloud-platform
p/aperture-7
p/raycast
p/kuc-kuc
p/kodlo
p/lasso-11
p/ai-context-flow
p/offiai
p/many-displays
p/reso
p/dino-kids
p/dex-by-exmergo
p/supabase
p/jev
p/htmldrag
p/murror
p/nexupira
p/jot-2-0
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.