VDB
Sign up
MEDIUM6.9

GHSA-7qx7-33qx-rqx2

Next.js: SVG rejection bypass in the image optimization

Quick fix

GHSA-7qx7-33qx-rqx2 — next: upgrade to the fixed version with the command below.

npm install next@15.5.29

Details

On self-hosted deployments, the Next.js image optimizer (`/_next/image`) can be made to process an attacker-supplied SVG even when SVG support is disabled with `dangerouslyAllowSVG: false` (the default). This reaches an SVG parser the application intended to keep disabled, increasing exposure to denial of service and SVG decoder vulnerabilities.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/next
Introduced in: 15.0.0Fixed in: 15.5.29
Fixnpm install next@15.5.29
npm/next
Introduced in: 16.0.0Fixed in: 16.4.5
Fixnpm install next@16.4.5

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:npm/next"]}'