fix: disable dangerouslyAllowSVG to prevent SVG-based XSS (#2646) - #2726
fix: disable dangerouslyAllowSVG to prevent SVG-based XSS (#2646)#2726tmdeveloper007 wants to merge 1 commit into
Conversation
The Next.js image optimisation pipeline had dangerouslyAllowSVG enabled, which allows SVG files to be processed through Next.js image optimisation. SVG files can contain embedded JavaScript that may execute in the user's browser via image tags — a known XSS attack vector. Fix: set dangerouslyAllowSVG to false (the secure default). CSP header already present as defence-in-depth (issue nisshchayarathi#2646).
|
Someone is attempting to deploy a commit to the Nisshchaya's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
|
CI status note: the failing Lint and Type Check checks are pre-existing failures on the |
Description
next.config.jshaddangerouslyAllowSVG: true, allowing SVG files to be processed through Next.js's image optimisation pipeline. SVG files can contain embedded JavaScript that may execute in the browser via<img>tags — a known XSS attack vector even with a restrictive CSP header.Fix
Set
dangerouslyAllowSVGtofalse(the secure default). The existing CSP header (script-src 'none'; sandbox;) provides defence-in-depth.Files Changed
next.config.jsRelated Issues